summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-04-21 17:19:39 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-04-21 17:19:39 +0000
commitded28410835671021876e845572816d3083efe34 (patch)
treed1f9b748d0c562708657f80cd2830c7582d455f6
parent854e95fe80cf2750477daaa1fcce14b8ef43418c (diff)
Merge changes between r17813 and r18165 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18166 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--libc/.gitignore5
-rw-r--r--libc/ChangeLog675
-rw-r--r--libc/NEWS23
-rw-r--r--libc/abilist/libc.abilist2
-rw-r--r--libc/bits/byteswap-16.h (renamed from libc/sysdeps/unix/getppid.S)24
-rw-r--r--libc/bits/byteswap.h56
-rw-r--r--libc/bits/types.h1
-rw-r--r--libc/bits/typesizes.h1
-rw-r--r--libc/crypt/md5-crypt.c22
-rw-r--r--libc/crypt/sha256-crypt.c38
-rw-r--r--libc/crypt/sha512-crypt.c37
-rw-r--r--libc/csu/init-first.c6
-rw-r--r--libc/debug/strcat_chk.c2
-rw-r--r--libc/debug/strcpy_chk.c2
-rw-r--r--libc/debug/strncat_chk.c2
-rw-r--r--libc/debug/strncpy_chk.c2
-rw-r--r--libc/elf/Makefile3
-rw-r--r--libc/elf/dl-load.c5
-rw-r--r--libc/elf/dl-lookup.c3
-rw-r--r--libc/elf/dl-support.c4
-rw-r--r--libc/elf/dynamic-link.h69
-rw-r--r--libc/elf/elf.h1
-rw-r--r--libc/elf/pldd-xx.c18
-rw-r--r--libc/elf/rtld.c24
-rw-r--r--libc/elf/tst-auditmod1.c2
-rw-r--r--libc/elf/tst-auditmod3b.c2
-rw-r--r--libc/elf/tst-auditmod4b.c2
-rw-r--r--libc/elf/tst-auditmod5b.c2
-rw-r--r--libc/elf/tst-auditmod6b.c2
-rw-r--r--libc/elf/tst-auditmod6c.c2
-rw-r--r--libc/elf/tst-auditmod7b.c2
-rw-r--r--libc/iconvdata/tcvn5712-1.c7
-rw-r--r--libc/include/sys/uio.h8
-rw-r--r--libc/libio/fileops.c19
-rw-r--r--libc/libio/libio.h10
-rw-r--r--libc/libio/stdio.h6
-rw-r--r--libc/locale/iso-639.def2
-rw-r--r--libc/localedata/ChangeLog21
-rw-r--r--libc/localedata/locales/ca_ES6
-rw-r--r--libc/localedata/locales/cy_GB7
-rw-r--r--libc/localedata/locales/en_GB6
-rw-r--r--libc/localedata/locales/ru_UA2
-rw-r--r--libc/manual/.gitignore1
-rw-r--r--libc/manual/conf.texi4
-rw-r--r--libc/manual/filesys.texi14
-rw-r--r--libc/manual/install.texi2
-rw-r--r--libc/manual/llio.texi14
-rw-r--r--libc/manual/setjmp.texi15
-rw-r--r--libc/manual/startup.texi7
-rw-r--r--libc/manual/stdio.texi35
-rw-r--r--libc/manual/syslog.texi2
-rw-r--r--libc/manual/time.texi19
-rw-r--r--libc/math/Makefile4
-rw-r--r--libc/math/libm-test.inc136
-rw-r--r--libc/math/s_ctan.c44
-rw-r--r--libc/math/s_ctanf.c44
-rw-r--r--libc/math/s_ctanh.c43
-rw-r--r--libc/math/s_ctanhf.c43
-rw-r--r--libc/math/s_ctanhl.c43
-rw-r--r--libc/math/s_ctanl.c45
-rw-r--r--libc/math/w_ilogb.c (renamed from libc/sysdeps/unix/common/lxstat.c)34
-rw-r--r--libc/math/w_ilogbf.c (renamed from libc/sysdeps/unix/xstat.c)30
-rw-r--r--libc/math/w_ilogbl.c37
-rw-r--r--libc/nis/nss_compat/compat-initgroups.c74
-rw-r--r--libc/nptl/ChangeLog4
-rw-r--r--libc/nptl/sysdeps/x86_64/tls.h9
-rw-r--r--libc/nss/Makefile2
-rw-r--r--libc/nss/nss_db/db-initgroups.c3
-rw-r--r--libc/nss/nsswitch.c18
-rw-r--r--libc/nss/tst-nss-static.c15
-rw-r--r--libc/po/ru.po2
-rw-r--r--libc/po/vi.po1688
-rw-r--r--libc/resolv/nss_dns/dns-host.c21
-rw-r--r--libc/resolv/res_send.c102
-rwxr-xr-xlibc/scripts/check-local-headers.sh2
-rw-r--r--libc/stdio-common/bug22.c28
-rw-r--r--libc/stdio-common/printf-parse.h23
-rw-r--r--libc/stdio-common/printf-parsemb.c42
-rw-r--r--libc/stdio-common/vfprintf.c77
-rw-r--r--libc/stdlib/stdlib.h5
-rw-r--r--libc/string/Makefile4
-rw-r--r--libc/string/byteswap.h6
-rw-r--r--libc/string/endian.h23
-rw-r--r--libc/string/memchr.c4
-rw-r--r--libc/string/memrchr.c4
-rw-r--r--libc/string/rawmemchr.c4
-rw-r--r--libc/string/strcat.c2
-rw-r--r--libc/string/strchr.c2
-rw-r--r--libc/string/strchrnul.c2
-rw-r--r--libc/string/strcmp.c2
-rw-r--r--libc/string/strcpy.c2
-rw-r--r--libc/string/strncat.c4
-rw-r--r--libc/string/strncmp.c4
-rw-r--r--libc/string/strncpy.c2
-rw-r--r--libc/string/test-memcmp.c4
-rw-r--r--libc/string/test-strcmp.c4
-rw-r--r--libc/string/test-string.h3
-rw-r--r--libc/sysdeps/generic/ldsodefs.h5
-rw-r--r--libc/sysdeps/generic/math_private.h3
-rw-r--r--libc/sysdeps/generic/memcopy.h3
-rw-r--r--libc/sysdeps/gnu/errlist-compat.awk4
-rw-r--r--libc/sysdeps/i386/bits/byteswap-16.h49
-rw-r--r--libc/sysdeps/i386/bits/byteswap.h48
-rw-r--r--libc/sysdeps/i386/fpu/bits/fenv.h4
-rw-r--r--libc/sysdeps/i386/fpu/bits/mathinline.h14
-rw-r--r--libc/sysdeps/i386/fpu/e_ilogb.S (renamed from libc/sysdeps/i386/fpu/s_ilogb.S)10
-rw-r--r--libc/sysdeps/i386/fpu/e_ilogbf.S (renamed from libc/sysdeps/i386/fpu/s_ilogbf.S)10
-rw-r--r--libc/sysdeps/i386/fpu/e_ilogbl.S (renamed from libc/sysdeps/i386/fpu/s_ilogbl.S)10
-rw-r--r--libc/sysdeps/i386/fpu/e_pow.S53
-rw-r--r--libc/sysdeps/i386/fpu/e_powl.S31
-rw-r--r--libc/sysdeps/i386/fpu/libm-test-ulps66
-rw-r--r--libc/sysdeps/i386/i686/memset_chk.S4
-rw-r--r--libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S1985
-rw-r--r--libc/sysdeps/i386/init-first.c6
-rw-r--r--libc/sysdeps/ieee754/dbl-64/e_ilogb.c (renamed from libc/sysdeps/ieee754/dbl-64/s_ilogb.c)7
-rw-r--r--libc/sysdeps/ieee754/dbl-64/e_pow.c5
-rw-r--r--libc/sysdeps/ieee754/dbl-64/w_exp.c4
-rw-r--r--libc/sysdeps/ieee754/flt-32/e_ilogbf.c (renamed from libc/sysdeps/ieee754/flt-32/s_ilogbf.c)3
-rw-r--r--libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c (renamed from libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c)3
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c (renamed from libc/sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c)3
-rw-r--r--libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c (renamed from libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c)3
-rw-r--r--libc/sysdeps/ieee754/ldbl-opt/w_ilogb.c (renamed from libc/sysdeps/ieee754/ldbl-opt/s_ilogb.c)2
-rw-r--r--libc/sysdeps/ieee754/ldbl-opt/w_ilogbl.c (renamed from libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c)2
-rw-r--r--libc/sysdeps/mach/hurd/bits/typesizes.h1
-rw-r--r--libc/sysdeps/mach/hurd/i386/init-first.c7
-rw-r--r--libc/sysdeps/mach/hurd/powerpc/init-first.c6
-rw-r--r--libc/sysdeps/mach/hurd/ttyname_r.c4
-rw-r--r--libc/sysdeps/mach/i386/machine-lock.h4
-rw-r--r--libc/sysdeps/mach/powerpc/machine-lock.h4
-rw-r--r--libc/sysdeps/powerpc/memmove.c119
-rw-r--r--libc/sysdeps/powerpc/powerpc32/dl-machine.h4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c131
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c256
-rw-r--r--libc/sysdeps/s390/bits/byteswap-16.h65
-rw-r--r--libc/sysdeps/s390/bits/byteswap.h62
-rw-r--r--libc/sysdeps/s390/s390-32/dl-machine.h3
-rw-r--r--libc/sysdeps/sh/init-first.c6
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fedisblxcpt.c (renamed from libc/sysdeps/unix/sysv/tcgetpgrp.c)38
-rw-r--r--libc/sysdeps/sh/sh4/fpu/feenablxcpt.c (renamed from libc/sysdeps/unix/sysv/tcsetpgrp.c)29
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fegetenv.c6
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fegetexcept.c (renamed from libc/sysdeps/unix/sysv/tcdrain.c)27
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fesetround.c6
-rw-r--r--libc/sysdeps/sh/sh4/fpu/feupdateenv.c (renamed from libc/sysdeps/unix/sysv/tcflush.c)43
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c42
-rw-r--r--libc/sysdeps/sh/sh4/fpu/ftestexcept.c3
-rw-r--r--libc/sysdeps/sparc/fpu/libm-test-ulps134
-rw-r--r--libc/sysdeps/sparc/mempcpy.S1
-rw-r--r--libc/sysdeps/sparc/sparc32/dl-machine.h9
-rw-r--r--libc/sysdeps/sparc/sparc32/memcopy.h20
-rw-r--r--libc/sysdeps/sparc/sparc32/memcpy.S14
-rw-r--r--libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c1
-rw-r--r--libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c1
-rw-r--r--libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c1
-rw-r--r--libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c1
-rw-r--r--libc/sysdeps/sparc/sparc64/dl-machine.h15
-rw-r--r--libc/sysdeps/sparc/sparc64/memcopy.h1
-rw-r--r--libc/sysdeps/sparc/sparc64/memcpy.S23
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S10
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S10
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S6
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memcpy.S70
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S54
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/memset.S10
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c1
-rw-r--r--libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c1
-rw-r--r--libc/sysdeps/sparc/sparc64/rtld-memcpy.c2
-rw-r--r--libc/sysdeps/sparc/sparc64/rtld-memset.c1
-rw-r--r--libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c (renamed from libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c)6
-rw-r--r--libc/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h1
-rw-r--r--libc/sysdeps/unix/common/syscalls.list1
-rw-r--r--libc/sysdeps/unix/fxstat.c39
-rw-r--r--libc/sysdeps/unix/mkdir.c97
-rw-r--r--libc/sysdeps/unix/rmdir.c77
-rw-r--r--libc/sysdeps/unix/siglist.c61
-rw-r--r--libc/sysdeps/unix/syscalls.list3
-rw-r--r--libc/sysdeps/unix/sysv/Makefile41
-rw-r--r--libc/sysdeps/unix/sysv/Versions5
-rw-r--r--libc/sysdeps/unix/sysv/bits/dirent.h27
-rw-r--r--libc/sysdeps/unix/sysv/bits/fcntl.h93
-rw-r--r--libc/sysdeps/unix/sysv/bits/local_lim.h31
-rw-r--r--libc/sysdeps/unix/sysv/bits/signum.h55
-rw-r--r--libc/sysdeps/unix/sysv/bits/stat.h69
-rw-r--r--libc/sysdeps/unix/sysv/bits/utmp.h53
-rw-r--r--libc/sysdeps/unix/sysv/bits/utsname.h22
-rw-r--r--libc/sysdeps/unix/sysv/direct.h10
-rw-r--r--libc/sysdeps/unix/sysv/i386/time.S29
-rw-r--r--libc/sysdeps/unix/sysv/linux/Versions4
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/socket.h5
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/syscalls.list2
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h1
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h1
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c2
-rw-r--r--libc/sysdeps/unix/sysv/setrlimit.c56
-rw-r--r--libc/sysdeps/unix/sysv/settimeofday.c47
-rw-r--r--libc/sysdeps/unix/sysv/sigaction.c83
-rw-r--r--libc/sysdeps/unix/sysv/sysv_termio.h154
-rw-r--r--libc/sysdeps/unix/sysv/tcflow.c46
-rw-r--r--libc/sysdeps/unix/sysv/tcgetattr.c170
-rw-r--r--libc/sysdeps/unix/sysv/tcsendbrk.c43
-rw-r--r--libc/sysdeps/unix/sysv/tcsetattr.c209
-rw-r--r--libc/sysdeps/unix/xmknod.c41
-rw-r--r--libc/sysdeps/x86_64/bits/byteswap-16.h49
-rw-r--r--libc/sysdeps/x86_64/bits/byteswap.h126
-rw-r--r--libc/sysdeps/x86_64/bits/wordsize.h2
-rw-r--r--libc/sysdeps/x86_64/ffsll.c2
-rw-r--r--libc/sysdeps/x86_64/fpu/e_ilogbl.S (renamed from libc/sysdeps/x86_64/fpu/s_ilogbl.S)10
-rw-r--r--libc/sysdeps/x86_64/fpu/e_powl.S31
-rw-r--r--libc/sysdeps/x86_64/fpu/libm-test-ulps103
-rw-r--r--libc/sysdeps/x86_64/memset.S12
-rw-r--r--libc/sysdeps/x86_64/memset_chk.S4
-rw-r--r--libc/sysdeps/x86_64/preconfigure2
-rw-r--r--libc/sysdeps/x86_64/preconfigure.in2
-rw-r--r--libc/time/time.h2
-rw-r--r--libc/time/tst-mktime2.c2
-rw-r--r--libc/wcsmbs/Makefile4
-rw-r--r--libc/wcsmbs/tst-mbsnrtowcs.c83
-rw-r--r--ports/ChangeLog.arm285
-rw-r--r--ports/ChangeLog.hppa25
-rw-r--r--ports/ChangeLog.m68k18
-rw-r--r--ports/ChangeLog.mips6
-rw-r--r--ports/ChangeLog.tile6
-rw-r--r--ports/sysdeps/arm/Makefile35
-rw-r--r--ports/sysdeps/arm/Versions (renamed from ports/sysdeps/arm/eabi/Versions)0
-rw-r--r--ports/sysdeps/arm/__longjmp.S (renamed from ports/sysdeps/arm/eabi/__longjmp.S)0
-rw-r--r--ports/sysdeps/arm/abi-note.S (renamed from ports/sysdeps/arm/eabi/abi-note.S)0
-rw-r--r--ports/sysdeps/arm/aeabi_assert.c (renamed from ports/sysdeps/arm/eabi/aeabi_assert.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_atexit.c (renamed from ports/sysdeps/arm/eabi/aeabi_atexit.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_errno_addr.c (renamed from ports/sysdeps/arm/eabi/aeabi_errno_addr.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_lcsts.c (renamed from ports/sysdeps/arm/eabi/aeabi_lcsts.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_localeconv.c (renamed from ports/sysdeps/arm/eabi/aeabi_localeconv.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_math.c (renamed from ports/sysdeps/arm/eabi/aeabi_math.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_mb_cur_max.c (renamed from ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_memclr.c (renamed from ports/sysdeps/arm/eabi/aeabi_memclr.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_memcpy.c (renamed from ports/sysdeps/arm/eabi/aeabi_memcpy.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_memmove.c (renamed from ports/sysdeps/arm/eabi/aeabi_memmove.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_memset.c (renamed from ports/sysdeps/arm/eabi/aeabi_memset.c)0
-rw-r--r--ports/sysdeps/arm/aeabi_sighandlers.S (renamed from ports/sysdeps/arm/eabi/aeabi_sighandlers.S)0
-rw-r--r--ports/sysdeps/arm/aeabi_unwind_cpp_pr1.c (renamed from ports/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c)0
-rw-r--r--ports/sysdeps/arm/arm-mcount.S (renamed from ports/sysdeps/arm/eabi/arm-mcount.S)0
-rw-r--r--ports/sysdeps/arm/armv6t2/memchr.S (renamed from ports/sysdeps/arm/eabi/armv6t2/memchr.S)0
-rw-r--r--ports/sysdeps/arm/armv7/Implies (renamed from ports/sysdeps/arm/eabi/armv7/Implies)2
-rw-r--r--ports/sysdeps/arm/backtrace.c (renamed from ports/sysdeps/arm/eabi/backtrace.c)0
-rw-r--r--ports/sysdeps/arm/bits/fenv.h (renamed from ports/sysdeps/arm/eabi/bits/fenv.h)0
-rw-r--r--ports/sysdeps/arm/bits/huge_val.h (renamed from ports/sysdeps/arm/eabi/bits/huge_val.h)0
-rw-r--r--ports/sysdeps/arm/bits/predefs.h (renamed from ports/sysdeps/arm/eabi/bits/predefs.h)0
-rw-r--r--ports/sysdeps/arm/bits/setjmp.h (renamed from ports/sysdeps/arm/eabi/bits/setjmp.h)0
-rw-r--r--ports/sysdeps/arm/eabi/Makefile38
-rw-r--r--ports/sysdeps/arm/fclrexcpt.c (renamed from ports/sysdeps/arm/eabi/fclrexcpt.c)0
-rw-r--r--ports/sysdeps/arm/fedisblxcpt.c (renamed from ports/sysdeps/arm/eabi/fedisblxcpt.c)0
-rw-r--r--ports/sysdeps/arm/feenablxcpt.c (renamed from ports/sysdeps/arm/eabi/feenablxcpt.c)0
-rw-r--r--ports/sysdeps/arm/fegetenv.c (renamed from ports/sysdeps/arm/eabi/fegetenv.c)0
-rw-r--r--ports/sysdeps/arm/fegetexcept.c (renamed from ports/sysdeps/arm/eabi/fegetexcept.c)0
-rw-r--r--ports/sysdeps/arm/fegetround.c (renamed from ports/sysdeps/arm/eabi/fegetround.c)0
-rw-r--r--ports/sysdeps/arm/feholdexcpt.c (renamed from ports/sysdeps/arm/eabi/feholdexcpt.c)0
-rw-r--r--ports/sysdeps/arm/fesetenv.c (renamed from ports/sysdeps/arm/eabi/fesetenv.c)0
-rw-r--r--ports/sysdeps/arm/fesetround.c (renamed from ports/sysdeps/arm/eabi/fesetround.c)0
-rw-r--r--ports/sysdeps/arm/feupdateenv.c (renamed from ports/sysdeps/arm/eabi/feupdateenv.c)0
-rw-r--r--ports/sysdeps/arm/fgetexcptflg.c (renamed from ports/sysdeps/arm/eabi/fgetexcptflg.c)0
-rw-r--r--ports/sysdeps/arm/find_exidx.c (renamed from ports/sysdeps/arm/eabi/find_exidx.c)0
-rw-r--r--ports/sysdeps/arm/fpu_control.h (renamed from ports/sysdeps/arm/eabi/fpu_control.h)0
-rw-r--r--ports/sysdeps/arm/fraiseexcpt.c (renamed from ports/sysdeps/arm/eabi/fraiseexcpt.c)0
-rw-r--r--ports/sysdeps/arm/fsetexcptflg.c (renamed from ports/sysdeps/arm/eabi/fsetexcptflg.c)0
-rw-r--r--ports/sysdeps/arm/ftestexcept.c (renamed from ports/sysdeps/arm/eabi/ftestexcept.c)0
-rw-r--r--ports/sysdeps/arm/jmpbuf-offsets.h (renamed from ports/sysdeps/arm/eabi/jmpbuf-offsets.h)0
-rw-r--r--ports/sysdeps/arm/machine-gmon.h (renamed from ports/sysdeps/arm/eabi/machine-gmon.h)0
-rw-r--r--ports/sysdeps/arm/preconfigure4
-rw-r--r--ports/sysdeps/arm/rtld-global-offsets.sym (renamed from ports/sysdeps/arm/eabi/rtld-global-offsets.sym)0
-rw-r--r--ports/sysdeps/arm/setfpucw.c (renamed from ports/sysdeps/arm/eabi/setfpucw.c)0
-rw-r--r--ports/sysdeps/arm/setjmp.S (renamed from ports/sysdeps/arm/eabi/setjmp.S)0
-rw-r--r--ports/sysdeps/arm/shlib-versions1
-rw-r--r--ports/sysdeps/arm/start.S5
-rw-r--r--ports/sysdeps/arm/sysdep.h8
-rw-r--r--ports/sysdeps/hppa/configure56
-rw-r--r--ports/sysdeps/hppa/configure.in45
-rw-r--r--ports/sysdeps/hppa/crti.S80
-rw-r--r--ports/sysdeps/hppa/crtn.S88
-rw-r--r--ports/sysdeps/hppa/dl-fptr.c337
-rw-r--r--ports/sysdeps/hppa/dl-fptr.h5
-rw-r--r--ports/sysdeps/hppa/dl-irel.h47
-rw-r--r--ports/sysdeps/hppa/dl-machine.h6
-rw-r--r--ports/sysdeps/hppa/elf/configure140
-rw-r--r--ports/sysdeps/hppa/elf/configure.in47
-rw-r--r--ports/sysdeps/hppa/elf/initfini.c138
-rw-r--r--ports/sysdeps/hppa/entry.h (renamed from ports/sysdeps/hppa/elf/entry.h)0
-rw-r--r--ports/sysdeps/hppa/start.S (renamed from ports/sysdeps/hppa/elf/start.S)0
-rw-r--r--ports/sysdeps/m68k/m680x0/fpu/e_ilogb.c (renamed from ports/sysdeps/m68k/m680x0/fpu/s_ilogb.c)7
-rw-r--r--ports/sysdeps/m68k/m680x0/fpu/e_ilogbf.c (renamed from ports/sysdeps/m68k/m680x0/fpu/s_ilogbf.c)2
-rw-r--r--ports/sysdeps/m68k/m680x0/fpu/e_ilogbl.c (renamed from ports/sysdeps/m68k/m680x0/fpu/s_ilogbl.c)2
-rw-r--r--ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps67
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/Makefile41
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/clone.S21
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/configure (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/configure)2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/configure.in (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/configure.in)2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile42
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list32
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h199
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/ftruncate64.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/getcontext.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S)2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/internal_accept4.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h7
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/makecontext.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/mmap64.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/msgctl.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/Makefile (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/configure (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/unwind.h (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/pread.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/pread.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/pread64.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/pread64.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/pwrite.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/pwrite64.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/readahead.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/readahead.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/semctl.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/setcontext.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S)2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/shmctl.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/sigaction.c22
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/socket.S126
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/swapcontext.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/syscall.S (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/syscalls.list35
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/sysdep.h208
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/truncate64.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/umount.c (renamed from ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/vfork.S6
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c2
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h2
341 files changed, 6905 insertions, 4902 deletions
diff --git a/libc/.gitignore b/libc/.gitignore
index fbdcf5450..98f00f3e3 100644
--- a/libc/.gitignore
+++ b/libc/.gitignore
@@ -36,4 +36,7 @@ TODO.html
autom4te*.cache
-rtkaio
+/linuxthreads
+/linuxthreads_db
+/ports
+/rtkaio
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 9069eb338..26352f2ba 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,5 +1,680 @@
+2012-04-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/Versions (GLIBC_2.0): Add sysinfo.
+ * sysdeps/unix/sysv/Versions: Remove file.
+
+2012-04-21 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ [BZ #13927]
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+2012-04-21 Nix <nix@esperi.org.uk>
+
+ [BZ #7064]
+ * sysdeps/unix/sysv/linux/i386/syscalls.list: Omit explicit
+ version from __vm86.
+
+2012-04-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/common/lxstat.c: Remove file.
+ * sysdeps/unix/common/syscalls.list (sys_lstat): Remove.
+
+ * sysdeps/unix/sysv/Makefile: Remove file.
+
+ * sysdeps/unix/sysv/direct.h: Remove file.
+
+ * sysdeps/unix/sysv/bits/dirent.h: Remove file.
+ * sysdeps/unix/sysv/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/bits/local_lim.h: Likewise.
+ * sysdeps/unix/sysv/bits/signum.h: Likewise.
+ * sysdeps/unix/sysv/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/bits/utmp.h: Likewise.
+ * sysdeps/unix/sysv/bits/utsname.h: Likewise.
+
+ * sysdeps/unix/sysv/setrlimit.c: Remove file.
+
+ * sysdeps/unix/xmknod.c: Remove file.
+ * sysdeps/unix/syscalls.list (sys_mknod): Remove.
+
+ * sysdeps/unix/sysv/settimeofday.c: Remove file.
+
+ * sysdeps/unix/sysv/i386/time.S: Remove file.
+
+ * sysdeps/unix/fxstat.c: Remove file.
+ * sysdeps/unix/xstat.c: Likewise.
+ * sysdeps/unix/syscalls.list (sys_fstat, sys_stat): Remove.
+
+ * sysdeps/unix/sysv/sigaction.c: Remove file.
+
+ * sysdeps/unix/sysv/Makefile [termio.h not in sysdep_headers]
+ (sysdep_headers): Remove variable.
+ [termio.h not in sysdep_headers] (generated): Likewise.
+ [termio.h not in sysdep_headers] ($(objpfx)termio.h): Remove rule.
+ * sysdeps/unix/sysv/sysv_termio.h: Remove file.
+ * sysdeps/unix/sysv/tcdrain.c: Likewise.
+ * sysdeps/unix/sysv/tcflow.c: Likewise.
+ * sysdeps/unix/sysv/tcflush.c: Likewise.
+ * sysdeps/unix/sysv/tcgetattr.c: Likewise.
+ * sysdeps/unix/sysv/tcgetpgrp.c: Likewise.
+ * sysdeps/unix/sysv/tcsendbrk.c: Likewise.
+ * sysdeps/unix/sysv/tcsetattr.c: Likewise.
+ * sysdeps/unix/sysv/tcsetpgrp.c: Likewise.
+
+ * sysdeps/unix/siglist.c: Remove file.
+
+ * sysdeps/unix/getppid.S: Remove file.
+
+ * sysdeps/unix/mkdir.c: Remove file.
+ * sysdeps/unix/rmdir.c: Likewise.
+
+2012-04-19 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/gnu/errlist-compat.awk (END): Correct computation of
+ ERR_MAX value.
+ * sysdeps/unix/sysv/linux/Versions (GLIBC_2.12): Adjust
+ errlist-compat value.
+
+2012-04-18 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/generic/memcopy.h (reg_char): Delete.
+ * debug/strcat_chk.c: Use char, not reg_char.
+ * debug/strcpy_chk.c: Likewise.
+ * debug/strncat_chk.c: Likewise.
+ * debug/strncpy_chk.c: Likewise.
+ * string/memchr.c: Likewise.
+ * string/memrchr.c: Likewise.
+ * string/rawmemchr.c: Likewise.
+ * string/strcat.c: Likewise.
+ * string/strchr.c: Likewise.
+ * string/strchrnul.c: Likewise.
+ * string/strcmp.c: Likewise.
+ * string/strcpy.c: Likewise.
+ * string/strncat.c: Likewise.
+ * string/strncmp.c: Likewise.
+ * string/strncpy.c: Likewise.
+
+2012-04-18 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * sysdeps/powerpc/memmove.c: New file based on string/memmove.c where
+ __builtin_memcopy is called when src and dest ranges are known to not
+ overlap.
+
+2012-04-18 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * sysdeps/powerpc/powerpc64/power6/wordcopy.c
+ (_wordcopy_fwd_dest_aligned): Replace switch with a parameterized
+ fwd_align_merge macro call.
+ (_wordcopy_bwd_dest_aligned): Replace switch with a parameterized
+ bwd_align_merge macro call.
+ * sysdeps/powerpc/powerpc32/power6/wordcopy.c: Likewise.
+
+2012-04-18 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * sysdeps/powerpc/powerpc64/power6/wordcopy.c: Add fwd_align_merge and
+ bwd_align_merge macros.
+ (_wordcopy_fwd_dest_aligned): Use fwd_align_merge macro calls.
+ (_wordcopy_bwd_dest_aligned): Use bwd_align_merge macro calls.
+ * sysdeps/powerpc/powerpc32/power6/wordcopy.c: Likewise.
+
+2012-04-18 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/memcopy.h: Delete.
+
+2012-04-18 Andreas Jaeger <aj@suse.de>
+
+ [BZ# 6794]
+ * sysdeps/ieee754/ldbl-96/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+ * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-128/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+ * sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-64-128/e_ilogbl.c: ... here.
+ Adjust for changed ldbl-128 files.
+
+ * sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c: Moved to ...
+ * sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+2012-04-17 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc32/memcopy.h: Delete.
+
+2012-04-17 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/i386/fpu/e_ilogb.S: Remove __ilogb*_finite alias.
+ * sysdeps/i386/fpu/e_ilogbf.S: Likewise.
+ * sysdeps/i386/fpu/e_ilogbl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_ilogbl.S: Likewise.
+ * sysdeps/ieee754/dbl-64/e_ilogb.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_ilogbf.c: Likewise.
+
+2012-04-17 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ [BZ #6794]
+ * math/Makefile: Add e_ilogb and w_ilogb, remove s_logb.
+ * math/libm-test.inc: Add ilogb errno and exception tests.
+ * math/w_ilogb.c: New file: ilogb wrapper.
+ * math/w_ilogbf.c: New file: ilogbf wrapper.
+ * math/w_ilogbl.c: New file: ilogbl wrapper.
+ * sysdeps/generic/math_private.h: Add __ieee754_ilogb[l|f] prototypes.
+ * sysdeps/i386/fpu/s_ilogb.S: Moved to ...
+ * sysdeps/i386/fpu/e_ilogb.S: ... here. Also fixed a FE_DIVBYZERO
+ exception being thrown with 0.0 as argument.
+ * sysdeps/i386/fpu/s_ilogbf.S: Moved to ...
+ * sysdeps/i386/fpu/e_ilogbf.S: ... here. Also fixed a FE_DIVBYZERO
+ exception being thrown with 0.0 as argument.
+ * sysdeps/i386/fpu/s_ilogbl.S: Moved to ...
+ * sysdeps/i386/fpu/e_ilogbl.S: ... here. Also fixed a FE_DIVBYZERO
+ exception being thrown with 0.0 as argument.
+ * sysdeps/x86_64/fpu/s_ilogbl.S: Moved to ...
+ * sysdeps/x86_64/fpu/e_ilogbl.S: ... here. Also fixed a FE_DIVBYZERO
+ exception being thrown with 0.0 as argument.
+ * sysdeps/ieee754/dbl-64/s_ilogb.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_ilogb.c: ... here.
+ * sysdeps/ieee754/flt-32/s_ilogbf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_ilogbf.c: ... here.
+ * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c: ... here.
+ * sysdeps/ieee754/ldbl-opt/s_ilogb.c: Moved to ...
+ * sysdeps/ieee754/ldbl-opt/w_ilogb.c: ... here.
+ * sysdeps/ieee754/ldbl-opt/w_ilogbl.c: New file: ilogbl wrapper.
+
+2012-04-17 Petr Baudis <pasky@ucw.cz>
+
+ * include/sys/uio.h: Change __vector to __iovec to avoid clash
+ with altivec.
+
+2012-04-16 Marek Polacek <polacek@redhat.com>
+
+ * elf/pldd-xx.c: Rename static_assert to pldd_assert.
+
+2012-04-16 Marek Polacek <polacek@redhat.com>
+
+ * sysdeps/i386/fpu/bits/fenv.h (feraiseexcept): Reverse the
+ operands of fdivp instruction.
+
+2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf/tst-auditmod1.c: Check __ILP32__ instead of __LP64__.
+ * elf/tst-auditmod3b.c: Likewise.
+ * elf/tst-auditmod4b.c: Likewise.
+ * elf/tst-auditmod5b.c: Likewise.
+ * elf/tst-auditmod6b.c: Likewise.
+ * elf/tst-auditmod6c.c: Likewise.
+ * elf/tst-auditmod7b.c: Likewise.
+ * sysdeps/x86_64/ffsll.c (ffsl): Likewise.
+ * sysdeps/x86_64/preconfigure.in: Likewise.
+ * sysdeps/x86_64/preconfigure: Regenerated.
+
+2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/bits/wordsize.h (__WORDSIZE): Also check
+ __ILP32__.
+
+2012-04-13 Antoine Balestrat <merkil33@gmail.com>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+ (__get_clockfreq_via_proc_openprom): Fix test on wrong variable.
+
+2012-04-13 Chris Leonard <cjlhomeaddress@gmail.com>
+
+ [BZ #13973]
+ * locale/iso-639.def: Fix gl language name. Spotted by
+ Yaron Shahrabani.
+
+2012-04-12 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #2074]
+ * libio/libio.h (__io_write_fn): Update comment.
+
+2012-04-12 Petr Baudis <pasky@ucw.cz>
+
+ [BZ #2074]
+ * stdio.texi (Hook Functions): The user provided writer function
+ is not allowed to return -1.
+
+2012-04-11 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-04-11 Mike Frysinger <vapier@gentoo.org>
+
+ * .gitignore: Add /ports, /linuxthreads, and /linuxthreads_db.
+ Add a leading slash to rtkaio.
+
+2012-04-11 Jim Meyering <meyering@redhat.com>
+
+ [BZ #11959]
+ * libio/stdio.h (fwrite, fwrite_unlocked): Remove __wur.
+ It is not necessarily an error to ignore fwrite's return
+ value. One can reliably use ferror to test for errors after
+ the fact.
+
+2012-04-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bits/types.h (__snseconds_t): New type.
+ * time/time.h (struct timespec): Use __snseconds_t on tv_nsec.
+
+ * bits/typesizes.h (__SNSECONDS_T_TYPE): New macro.
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+ (__SNSECONDS_T_TYPE): Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+ (__SNSECONDS_T_TYPE): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+ (__SNSECONDS_T_TYPE): Likewise.
+
+2012-04-10 Andreas Jaeger <aj@suse.de>
+
+ [BZ #2636]
+ * manual/time.texi (Processor Time): Return type of times is
+ elapsed real time since an arbitrary point in the past.
+ (CPU Time): Move CLK_TCK from here...
+ (Processor Time): ...to here. Correct description.
+ * manual/conf.texi (Constants for Sysconf): Correct description of
+ _SC_CLK_TCK.
+
+2012-04-10 David S. Miller <davem@davemloft.net>
+
+ [BZ #13967]
+ * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Handle the case
+ where the is a gap between DT_REL(A) and DT_JMPREL.
+
+2012-04-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/bits/byteswap.h: Include <features.h>.
+ (__bswap_32): Use __builtin_bswap32 for GCC >= 4.2.
+ (__bswap_64): Use __builtin_bswap64 for GCC >= 4.2.
+
+2012-04-10 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * elf/dl-support.c (_dl_inhibit_cache): New variable.
+ * elf/rtld.c (_rtld_global_ro): New member _dl_inhibit_cache.
+ (dl_main): Handle --inhibit-cache.
+ * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): New member
+ _dl_inhibit_cache.
+ * elf/dl-load.c (_dl_map_object): Use it.
+ * elf/Makefile: Define SYSCONFDIR when building rtld.c.
+
+2012-04-09 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13872]
+ * sysdeps/i386/fpu/e_powl.S (p78): New object.
+ (__ieee754_powl): Saturate large exponents rather than testing for
+ overflow of y*log2(x).
+ * sysdeps/x86_64/fpu/e_powl.S: Likewise.
+ * math/libm-test.inc (pow_test): Do not permit spurious overflow
+ exceptions.
+
+ [BZ #11521]
+ * math/s_ctan.c: Include <float.h>.
+ (__ctan): Avoid internal overflow or cancellation in calculating
+ denominator.
+ * math/s_ctanf.c: Likewise.
+ * math/s_ctanl.c: Likewise.
+ * math/s_ctanh.c: Likewise.
+ * math/s_ctanhf.c: Likewise.
+ * math/s_ctanhl.c: Likewise.
+ * math/libm-test.inc (ctan_test): Add more tests.
+ (ctanh_test): Likewise.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-04-09 Andreas Jaeger <aj@suse.de>
+
+ [BZ #6894]
+ * manual/filesys.texi (Directory Entries): Mention that d_namlen
+ is an optional BSD extension.
+
+ [BZ #10254]
+ * manual/stdio.texi (Opening Streams): Document additional fopen
+ parameters.
+
+2012-04-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/i386/fpu/bits/mathinline.h (__sincos_code): Don't clobber
+ %eax without telling the compiler.
+
+2012-04-09 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ [BZ # 13963]
+ * manual/install.texi: Use sourceware.org.
+
+2012-04-09 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13873]
+ * sysdeps/ieee754/dbl-64/e_pow.c (huge, tiny): New variables.
+ (__ieee754_pow): Generate overflow and underflow using huge*huge
+ and tiny*tiny rather than just returning constant infinity or zero
+ for large exponents.
+ * math/libm-test.inc (pow_test): Require overflow exceptions for
+ applicable cases of large exponents.
+
+ [BZ #706]
+ * sysdeps/i386/fpu/e_pow.S (p10): New object.
+ (__ieee754_pow): Use iterative multiplication algorithm only for
+ integer exponents with absolute value below 1024. Check for odd
+ integer exponents when using algorithm for real exponents.
+ * math/libm-test.inc (pow_test): Add more tests.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+2012-04-08 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13705]
+ * math/libm-test.inc (exp_test): Do not allow overflow exception
+ on underflow test.
+
+2012-04-08 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #13705]
+ * sysdeps/ieee754/dbl-64/w_exp.c (__exp): Use __kernel_standard
+ instead of __kernel_standard_f.
+
+2012-04-08 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/i386/i686/memset_chk.S: Update copyright year.
+ * sysdeps/x86_64/memset_chk.S: Likewise.
+
+2012-04-08 Andreas Jaeger <aj@suse.de>
+
+ [BZ #10153]
+ * manual/startup.texi (Environment Access): Describe return value
+ for putenv and setenv.
+
+ [BZ #6895]
+ * manual/filesys.texi (Directory Entries): Add description for
+ DT_LNK.
+
+ [BZ #6890]
+ * manual/filesys.texi (Directory Entries): Clarify that it's file
+ system not operating system in the description of DT_UNKNOWN.
+
+ [BZ #6578]
+ * manual/syslog.texi (closelog): Fix reference, it's openlog.
+
+2012-04-08 Stephen Compall <s11@member.fsf.org>
+
+ [BZ #6649]
+ * manual/llio.texi (Opening and Closing Files): Add cross
+ reference to explain mode argument.
+
+2012-04-07 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/i386/i686/memset_chk.S: Change PIC to SHARED.
+ * sysdeps/x86_64/memset_chk.S: Likewise.
+
+2012-04-07 David S. Miller <davem@davemloft.net>
+
+ * elf/elf.h (R_SPARC_WDISP10): Define.
+ * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle
+ R_SPARC_SIZE32.
+ * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Handle
+ R_SPARC_SIZE64 and R_SPARC_H34.
+
+2012-04-07 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Simplify
+ conditions and remove no longer applicable assertion.
+
+2012-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bits/byteswap.h: Include <features.h>.
+ (__bswap_32): Use __builtin_bswap32 for GCC >= 4.2.
+ (__bswap_64): Use __builtin_bswap64 for GCC >= 4.2.
+
+2012-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bits/byteswap.h (__bswap_16): Removed.
+ Include <bits/byteswap-16.h> to get __bswap_16.
+ * sysdeps/i386/bits/byteswap.h: Likewise.
+ * sysdeps/s390/bits/byteswap.h: Likewise.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+ * bits/byteswap-16.h: New file.
+ * sysdeps/i386/bits/byteswap-16.h: Likewise.
+ * sysdeps/s390/bits/byteswap-16.h: Likewise.
+ * sysdeps/x86_64/bits/byteswap-16.h: Likewise.
+ * string/Makefile (headers): Add bits/byteswap-16.h.
+
+2012-04-06 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ [BZ #13895]
+ * nss/nsswitch.c (nss_load_library, __nss_lookup_function): Avoid
+ extra indirection.
+ * nss/Makefile (tests-static, tests): Add tst-nss-static.
+ * nss/tst-nss-static.c: New.
+
+2012-04-06 Robert Millan <rmh@gnu.org>
+
+ [BZ #6486]
+ * manual/llio.texi (File Position Primitive): lseek
+ refers to WHENCE when it really means OFFSET.
+
+2012-04-06 Andreas Jaeger <aj@suse.de>
+
+ * nss/nss_db/db-initgroups.c: Include <string.h> for strlen and
+ strncmp declarations.
+
+ * abilist/libc.abilist: Add __poll and __ppoll.
+
+2012-04-05 David S. Miller <davem@davemloft.net>
+
+ * scripts/check-local-headers.sh: Accept a host triplet in the
+ path matched by the exclude regexp.
+
+ * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Reduce down to one
+ definition.
+ * sysdeps/powerpc/powerpc32/dl-machine.h
+ (ELF_MACHINE_PLTREL_OVERLAP): Delete.
+ * sysdeps/s390/s390-32/dl-machine.h
+ (ELF_MACHINE_PLTREL_OVERLAP): Likewise.
+ * sysdeps/sparc/sparc32/dl-machine.h
+ (ELF_MACHINE_PLTREL_OVERLAP): Likewise.
+ * sysdeps/sparc/sparc64/dl-machine.h
+ (ELF_MACHINE_PLTREL_OVERLAP): Likewise.
+
+ * elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off
+ lazy binding.
+ * elf/dl-lookup.c (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore
+ undefined symbol errors.
+
+ * elf/rtld.c (dl_main): Skip VDSO when checking for unused
+ DT_NEEDED entries.
+
+2012-04-05 Michael Matz <matz@suse.de>
+
+ [BZ #13592]
+ * sysdeps/x86_64/memset.S: Fix size paramater comparisions.
+
+2012-04-05 Andreas Jaeger <aj@suse.de>
+
+ [BZ #13908]
+ * stdlib/stdlib.h: Don't warn about unused result of mktemp, fix
+ comment.
+
+2012-04-05 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+
+ * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Fix return value
+ which ROUND is no valid rounding mode.
+
+2012-04-05 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+
+ * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Set fpscr register which
+ read again.
+ * sysdeps/sh/sh4/fpu/ftestexcept.c: Likewise.
+
+2012-04-05 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+
+ * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Produce
+ an exception using FPU order intentionally.
+
+2012-04-05 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+
+ * sysdeps/sh/sh4/fpu/fedisblxcpt.c: New file.
+ * sysdeps/sh/sh4/fpu/feenablxcpt.c: New file.
+ * sysdeps/sh/sh4/fpu/fegetexcept.c: New file.
+ * sysdeps/sh/sh4/fpu/feupdateenv.c: New file.
+
+2012-04-05 Simon Josefsson <simon@josefsson.org>
+
+ [BZ #12340]
+ * sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Return ERANGE instead of
+ EINVAL when BUFLEN is too smal.
+
+2012-04-05 Thomas Schwinge <thomas@codesourcery.com>
+
+ [BZ #13553]
+ * sysdeps/mach/i386/machine-lock.h: Use volatile instead of __volatile.
+ * sysdeps/mach/powerpc/machine-lock.h: Likewise.
+
+2012-04-03 Andreas Jaeger <aj@suse.de>
+
+ [BZ #13938]
+ * manual/setjmp.texi (System V contexts): Fix sentence.
+
+ [BZ #13926]
+ * sysdeps/i386/bits/byteswap.h [!__GNUC__](__bswap_constant_64):
+ New macro for this case.
+ [!__GNUC__] (__bswap_64): New inline function for this case.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+ * bits/byteswap.h: Likewise.
+ * sysdeps/s390/bits/byteswap.h: [!__GNUC__] (__bswap_64): Use
+ ull, guard with __GLIBC_HAVE_LONG_LONG.
+
+ * string/endian.h (htobe64,htole64,be64toh,le64toh): Guard with
+ __GLIBC_HAVE_LONG_LONG.
+
+ * string/byteswap.h (bswap_64): Guard with __GLIBC_HAVE_LONG_LONG.
+ Include <features.h> for __GLIBC_HAVE_LONG_LONG.
+
+2012-04-02 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ [BZ #13691]
+ * iconvdata/tcvn5712-1.c (FROM_LOOP): Test end of input using
+ inptr and inend, rather than using last_ch.
+
+2012-04-02 David S. Miller <davem@davemloft.net>
+
+ With help from Paul Eggert, Carlos O'Donell, and Roland McGrath.
+ * stdio-common/printf-parse.h (read_int): Change return type to
+ 'int', return -1 on INT_MAX overflow.
+ * stdio-common/vfprintf.c (vfprintf): Validate width and precision
+ against overflow of INT_MAX. Set errno to EOVERFLOW when 'done'
+ overflows INT_MAX. Check for overflow of in-format-string precision
+ values properly. Use EOVERFLOW rather than ERANGE throughout. Use
+ SIZE_MAX not INT_MAX for integer overflow test.
+ * stdio-common/printf-parsemb.c: If read_int signals an overflow,
+ skip the construct in the format string but do not record anything.
+ * stdio-common/bug22.c: Adjust to test both width/prevision
+ INT_MAX overflow as well as total length INT_MAX overflow. Check
+ explicitly for proper errno values.
+
+2012-04-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ * string/test-memcmp.c [! WIDE]: #include <limits.h> for CHAR_MIN,
+ CHAR_MAX.
+ * string/test-strcmp.c [! WIDE]: Likewise.
+ * time/tst-mktime2.c: Likewise for INT_MAX.
+ * string/test-string.h: #include <sys/param.h> for MIN.
+
+ * csu/init-first.c (__libc_init_first): Call __ctype_init.
+ * sysdeps/i386/init-first.c (init): Likewise.
+ * sysdeps/mach/hurd/i386/init-first.c (posixland_init): Likewise.
+ * sysdeps/mach/hurd/powerpc/init-first.c (posixland_init): Likewise.
+ * sysdeps/sh/init-first.c (init): Likewise.
+
+2012-04-01 Ulrich Drepper <drepper@gmail.com>
+
+ * po/ru.po: Update from translation team.
+ * po/vi.po: Likewise.
+
+2012-03-31 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * resolv/nss_dns/dns-host.c: Merge copyright years.
+
+2012-03-22 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Update.
+ Optimize memcpy with prefetch if
+ DATA_CACHE_SIZE_HALF <= len < SHARED_CACHE_SIZE_HALF and
+ src, dst pointers have unequal 16 byte alignments.
+
+2012-03-30 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #13928]
+ * resolv/nss_dns/dns-host.c (getanswer_r): Also consider ttl
+ from a CNAME entry and return the minimum ttl for the query.
+ (gaih_getanswer_slice): Likewise.
+
+2012-03-30 Jeff Law <law@redhat.com>
+
+ * crypt/md5-crypt.c (__md5_crypt_r): Avoid unbounded alloca uses
+ due to long keys.
+ * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
+ * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
+
+ * resolv/nss_dns/dns-host.c: Update copyright year.
+
+2012-03-30 Ulrich Drepper <drepper@gmail.com>
+
+ * resolv/res_send.c (send_dg): Use sendmmsg if we have to write two
+ requests to save a system call. Fix check that all bytes are sent.
+
+ * sysdeps/unix/sysv/linux/bits/socket.h (struct mmsghdr): Fix up
+ comments for sendmmsg.
+
+2012-03-30 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ [BZ #13691]
+ * iconvdata/tcvn5712-1.c (FROM_LOOP): Fix a bug when converting strings
+ with only 1 character between 0x0041 and 0x01b0.
+ * wcsmbs/Makefile (tests): Add tst-mbsnrtowcs.
+ * wcsmbs/tst-mbsnrtowcs.c: New file.
+
+2012-03-29 David S. Miller <davem@davemloft.net>
+
+ * libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize
+ small copies by hand.
+
+2012-03-28 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #13761]
+ * nis/nss_compat/compat-initgroups.c (getgrent_next_nss,
+ _nss_compat_initgroups_dyn): Fall back to malloc/free
+ for large group memberships.
+
2012-03-28 David S. Miller <davem@davemloft.net>
+ * sysdeps/sparc/sparc32/memcpy.S: Implement mempcpy using a stub
+ that branches into memcpy.
+ * sysdeps/sparc/sparc64/memcpy.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Add mempcpy multiarch
+ bits.
+ * sysdeps/sparc/sparc64/rtld-memcpy.c: Include generic mempcpy
+ implementation too.
+ * sysdeps/sparc/mempcpy.S: New file.
+
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Provide a hidden def to
+ the IFUNC routine in the libc case.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise.
+
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc64/multiarch/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c: New file.
+ * sysdeps/sparc/sparc64/rtld-memset.c: New file.
+ * sysdeps/sparc/sparc64/rtld-memcpy.c: New file.
+
+ * sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Unroll main
+ loop to 256 bytes instead of 64 bytes and fix test signedness.
+
* sysdeps/sparc/Makefile: Add -fPIC to ASFLAGS-.os here....
* sysdeps/sparc/sparc32/Makefile: rather than here...
* sysdeps/sparc/sparc64/Makefile: and here.
diff --git a/libc/NEWS b/libc/NEWS
index ec8ecdb45..a0bff3755 100644
--- a/libc/NEWS
+++ b/libc/NEWS
@@ -9,16 +9,19 @@ Version 2.16
* The following bugs are resolved with this release:
- 174, 350, 369, 411, 2541, 2547, 2548, 2551, 2552, 2553, 2554, 2562, 2563,
- 2565, 2566, 2576, 2678, 3335, 3866, 3868, 3976, 3992, 4026, 4108, 4596,
- 4822, 5077, 5461, 5805, 5993, 6471, 6730, 6884, 6907, 6911, 9739, 9902,
- 10110, 10135, 10140, 10210, 10545, 10716, 11174, 11322, 11365, 11451,
- 11494, 12047, 13058, 13525, 13526, 13527, 13528, 13529, 13530, 13531,
- 13532, 13533, 13547, 13551, 13552, 13553, 13555, 13559, 13566, 13583,
- 13618, 13637, 13656, 13658, 13673, 13695, 13704, 13706, 13726, 13738,
- 13760, 13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851,
- 13852, 13854, 13871, 13879, 13883, 13892, 13910, 13911, 13912, 13913,
- 13915, 13916, 13917, 13918, 13919, 13920, 13921
+ 174, 350, 369, 411, 706, 2074, 2541, 2547, 2548, 2551, 2552, 2553, 2554,
+ 2562, 2563, 2565, 2566, 2576, 2636, 2678, 3335, 3768, 3866, 3868, 3976,
+ 3992, 4026, 4108, 4596, 4822, 5077, 5461, 5805, 5993, 6471, 6486, 6578,
+ 6649, 6730, 6770, 6794, 6884, 6890, 6894, 6895, 6907, 6911, 7064, 9739,
+ 9902, 10110, 10135, 10140, 10153, 10210, 10254, 10346, 10545, 10716,
+ 11174, 11322, 11365, 11451, 11494, 11521, 11959, 12047, 12340, 13058,
+ 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547,
+ 13551, 13552, 13553, 13555, 13559, 13566, 13583, 13592, 13618, 13637,
+ 13656, 13658, 13673, 13691, 13695, 13704, 13705, 13706, 13726, 13738,
+ 13760, 13761, 13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846,
+ 13851, 13852, 13854, 13871, 13872, 13873, 13879, 13883, 13892, 13895,
+ 13908, 13910, 13911, 13912, 13913, 13915, 13916, 13917, 13918, 13919,
+ 13920, 13921, 13926, 13927, 13928, 13938, 13963, 13967, 13973
* ISO C11 support:
diff --git a/libc/abilist/libc.abilist b/libc/abilist/libc.abilist
index dba2fc936..d917e4a98 100644
--- a/libc/abilist/libc.abilist
+++ b/libc/abilist/libc.abilist
@@ -2493,6 +2493,8 @@ GLIBC_2.15 i.86-.*-linux.*/thread powerpc-.*-linux.*/thread powerpc64-.*-linux.*
scandirat64 F
GLIBC_2.16 i.86-.*-linux.*/thread powerpc-.*-linux.*/thread powerpc64-.*-linux.*/thread s390-.*-linux.*/thread s390x-.*-linux.*/thread sh[34].*-.*-linux.*/thread x86_64-.*-linux.*/thread
GLIBC_2.16 A
+ __poll_chk F
+ __ppoll_chk F
aligned_alloc F
c16rtomb F
c32rtomb F
diff --git a/libc/sysdeps/unix/getppid.S b/libc/bits/byteswap-16.h
index e53f313e4..078dd0e17 100644
--- a/libc/sysdeps/unix/getppid.S
+++ b/libc/bits/byteswap-16.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Macros to swap the order of bytes in 16-bit integer values.
+ 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,15 +16,18 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
+#ifndef _BITS_BYTESWAP_H
+# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
+#endif
-#ifdef SYS_getppid
-SYSCALL__ (getppid, 0)
+#ifdef __GNUC__
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
#else
-PSEUDO (__getppid, getpid, 0)
- MOVE(r1, r0)
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
#endif
- ret
-PSEUDO_END(__getppid)
-
-weak_alias (__getppid, getppid)
diff --git a/libc/bits/byteswap.h b/libc/bits/byteswap.h
index 9d658e447..d818293a4 100644
--- a/libc/bits/byteswap.h
+++ b/libc/bits/byteswap.h
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000-2002,2005,2008,2011
- 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
@@ -24,21 +23,14 @@
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
+#include <features.h>
+
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
-#ifdef __GNUC__
-# define __bswap_16(x) \
- (__extension__ \
- ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
-#else
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
- return __bswap_constant_16 (__bsx);
-}
-#endif
+/* Get __bswap_16. */
+#include <bits/byteswap-16.h>
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
@@ -46,9 +38,17 @@ __bswap_16 (unsigned short int __bsx)
(((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
#ifdef __GNUC__
-# define __bswap_32(x) \
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+ return __builtin_bswap32 (__bsx);
+}
+# else
+# define __bswap_32(x) \
(__extension__ \
({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); }))
+# endif
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
@@ -57,8 +57,8 @@ __bswap_32 (unsigned int __bsx)
}
#endif
-#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
+#if __GNUC_PREREQ (2, 0)
# define __bswap_constant_64(x) \
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
@@ -69,7 +69,14 @@ __bswap_32 (unsigned int __bsx)
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56)))
-# define __bswap_64(x) \
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __builtin_bswap64 (__bsx);
+}
+# else
+# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
unsigned int __l[2]; } __w, __r; \
@@ -82,6 +89,23 @@ __bswap_32 (unsigned int __bsx)
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
+# endif
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
diff --git a/libc/bits/types.h b/libc/bits/types.h
index a9bf0add0..ae79a6f47 100644
--- a/libc/bits/types.h
+++ b/libc/bits/types.h
@@ -148,6 +148,7 @@ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+__STD_TYPE __SNSECONDS_T_TYPE __snseconds_t; /* Signed count of nanoseconds. */
__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? */
diff --git a/libc/bits/typesizes.h b/libc/bits/typesizes.h
index e1c5a27bb..179fe5f56 100644
--- a/libc/bits/typesizes.h
+++ b/libc/bits/typesizes.h
@@ -57,6 +57,7 @@
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
+#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/libc/crypt/md5-crypt.c b/libc/crypt/md5-crypt.c
index ba606bb8a..db4ea9c6f 100644
--- a/libc/crypt/md5-crypt.c
+++ b/libc/crypt/md5-crypt.c
@@ -1,6 +1,6 @@
/* One way encryption based on MD5 sum.
Compatible with the behavior of MD5 crypt introduced in FreeBSD 2.0.
- Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2009
+ Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2009, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -107,6 +107,8 @@ __md5_crypt_r (key, salt, buffer, buflen)
char *cp;
char *copied_key = NULL;
char *copied_salt = NULL;
+ char *free_key = NULL;
+ size_t alloca_used = 0;
/* Find beginning of salt string. The prefix should normally always
be present. Just in case it is not. */
@@ -119,7 +121,17 @@ __md5_crypt_r (key, salt, buffer, buflen)
if ((key - (char *) 0) % __alignof__ (md5_uint32) != 0)
{
- char *tmp = (char *) alloca (key_len + __alignof__ (md5_uint32));
+ char *tmp;
+
+ if (__libc_use_alloca (alloca_used + key_len + __alignof__ (md5_uint32)))
+ tmp = (char *) alloca (key_len + __alignof__ (md5_uint32));
+ else
+ {
+ free_key = tmp = (char *) malloc (key_len + __alignof__ (md5_uint32));
+ if (tmp == NULL)
+ return NULL;
+ }
+
key = copied_key =
memcpy (tmp + __alignof__ (md5_uint32)
- (tmp - (char *) 0) % __alignof__ (md5_uint32),
@@ -141,7 +153,10 @@ __md5_crypt_r (key, salt, buffer, buflen)
/* Initialize libfreebl3. */
NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
if (nss_ictx == NULL)
- return NULL;
+ {
+ free (free_key);
+ return NULL;
+ }
NSSLOWHASHContext *nss_ctx = NULL;
NSSLOWHASHContext *nss_alt_ctx = NULL;
#else
@@ -295,6 +310,7 @@ __md5_crypt_r (key, salt, buffer, buflen)
if (copied_salt != NULL)
memset (copied_salt, '\0', salt_len);
+ free (free_key);
return buffer;
}
diff --git a/libc/crypt/sha256-crypt.c b/libc/crypt/sha256-crypt.c
index eb2585b52..440933ac0 100644
--- a/libc/crypt/sha256-crypt.c
+++ b/libc/crypt/sha256-crypt.c
@@ -1,5 +1,5 @@
/* One way encryption based on SHA256 sum.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2007.
@@ -122,6 +122,9 @@ __sha256_crypt_r (key, salt, buffer, buflen)
/* Default number of rounds. */
size_t rounds = ROUNDS_DEFAULT;
bool rounds_custom = false;
+ size_t alloca_used = 0;
+ char *free_key = NULL;
+ char *free_pbytes = NULL;
/* Find beginning of salt string. The prefix should normally always
be present. Just in case it is not. */
@@ -148,7 +151,17 @@ __sha256_crypt_r (key, salt, buffer, buflen)
if ((key - (char *) 0) % __alignof__ (uint32_t) != 0)
{
- char *tmp = (char *) alloca (key_len + __alignof__ (uint32_t));
+ char *tmp;
+
+ if (__libc_use_alloca (alloca_used + key_len + __alignof__ (uint32_t)))
+ tmp = alloca_account (key_len + __alignof__ (uint32_t), alloca_used);
+ else
+ {
+ free_key = tmp = (char *) malloc (key_len + __alignof__ (uint32_t));
+ if (tmp == NULL)
+ return NULL;
+ }
+
key = copied_key =
memcpy (tmp + __alignof__ (uint32_t)
- (tmp - (char *) 0) % __alignof__ (uint32_t),
@@ -159,6 +172,7 @@ __sha256_crypt_r (key, salt, buffer, buflen)
if ((salt - (char *) 0) % __alignof__ (uint32_t) != 0)
{
char *tmp = (char *) alloca (salt_len + __alignof__ (uint32_t));
+ alloca_used += salt_len + __alignof__ (uint32_t);
salt = copied_salt =
memcpy (tmp + __alignof__ (uint32_t)
- (tmp - (char *) 0) % __alignof__ (uint32_t),
@@ -170,7 +184,10 @@ __sha256_crypt_r (key, salt, buffer, buflen)
/* Initialize libfreebl3. */
NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
if (nss_ictx == NULL)
- return NULL;
+ {
+ free (free_key);
+ return NULL;
+ }
NSSLOWHASHContext *nss_ctx = NULL;
NSSLOWHASHContext *nss_alt_ctx = NULL;
#else
@@ -233,7 +250,18 @@ __sha256_crypt_r (key, salt, buffer, buflen)
sha256_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence P. */
- cp = p_bytes = alloca (key_len);
+ if (__libc_use_alloca (alloca_used + key_len))
+ cp = p_bytes = (char *) alloca (key_len);
+ else
+ {
+ free_pbytes = cp = p_bytes = (char *)malloc (key_len);
+ if (free_pbytes == NULL)
+ {
+ free (free_key);
+ return NULL;
+ }
+ }
+
for (cnt = key_len; cnt >= 32; cnt -= 32)
cp = mempcpy (cp, temp_result, 32);
memcpy (cp, temp_result, cnt);
@@ -361,6 +389,8 @@ __sha256_crypt_r (key, salt, buffer, buflen)
if (copied_salt != NULL)
memset (copied_salt, '\0', salt_len);
+ free (free_key);
+ free (free_pbytes);
return buffer;
}
diff --git a/libc/crypt/sha512-crypt.c b/libc/crypt/sha512-crypt.c
index 8f8ed3328..e5d9cacfd 100644
--- a/libc/crypt/sha512-crypt.c
+++ b/libc/crypt/sha512-crypt.c
@@ -1,5 +1,5 @@
/* One way encryption based on SHA512 sum.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2007.
@@ -122,6 +122,9 @@ __sha512_crypt_r (key, salt, buffer, buflen)
/* Default number of rounds. */
size_t rounds = ROUNDS_DEFAULT;
bool rounds_custom = false;
+ size_t alloca_used = 0;
+ char *free_key = NULL;
+ char *free_pbytes = NULL;
/* Find beginning of salt string. The prefix should normally always
be present. Just in case it is not. */
@@ -148,7 +151,17 @@ __sha512_crypt_r (key, salt, buffer, buflen)
if ((key - (char *) 0) % __alignof__ (uint64_t) != 0)
{
- char *tmp = (char *) alloca (key_len + __alignof__ (uint64_t));
+ char *tmp;
+
+ if (__libc_use_alloca (alloca_used + key_len + __alignof__ (uint64_t)))
+ tmp = alloca_account (key_len + __alignof__ (uint64_t), alloca_used);
+ else
+ {
+ free_key = tmp = (char *) malloc (key_len + __alignof__ (uint64_t));
+ if (tmp == NULL)
+ return NULL;
+ }
+
key = copied_key =
memcpy (tmp + __alignof__ (uint64_t)
- (tmp - (char *) 0) % __alignof__ (uint64_t),
@@ -170,7 +183,10 @@ __sha512_crypt_r (key, salt, buffer, buflen)
/* Initialize libfreebl3. */
NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
if (nss_ictx == NULL)
- return NULL;
+ {
+ free (free_key);
+ return NULL;
+ }
NSSLOWHASHContext *nss_ctx = NULL;
NSSLOWHASHContext *nss_alt_ctx = NULL;
#else
@@ -233,7 +249,18 @@ __sha512_crypt_r (key, salt, buffer, buflen)
sha512_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence P. */
- cp = p_bytes = alloca (key_len);
+ if (__libc_use_alloca (alloca_used + key_len))
+ cp = p_bytes = (char *) alloca (key_len);
+ else
+ {
+ free_pbytes = cp = p_bytes = (char *)malloc (key_len);
+ if (free_pbytes == NULL)
+ {
+ free (free_key);
+ return NULL;
+ }
+ }
+
for (cnt = key_len; cnt >= 64; cnt -= 64)
cp = mempcpy (cp, temp_result, 64);
memcpy (cp, temp_result, cnt);
@@ -373,6 +400,8 @@ __sha512_crypt_r (key, salt, buffer, buflen)
if (copied_salt != NULL)
memset (copied_salt, '\0', salt_len);
+ free (free_key);
+ free (free_pbytes);
return buffer;
}
diff --git a/libc/csu/init-first.c b/libc/csu/init-first.c
index 011506195..050959dcb 100644
--- a/libc/csu/init-first.c
+++ b/libc/csu/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. Stub version.
- Copyright (C) 1995, 1997, 1998, 2001, 2002 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
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
@@ -55,4 +56,7 @@ void __libc_init_first
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
#endif
+
+ /* Initialize ctype data. */
+ __ctype_init ();
}
diff --git a/libc/debug/strcat_chk.c b/libc/debug/strcat_chk.c
index c930caaf0..8f842ee85 100644
--- a/libc/debug/strcat_chk.c
+++ b/libc/debug/strcat_chk.c
@@ -28,7 +28,7 @@ __strcat_chk (dest, src, destlen)
{
char *s1 = dest;
const char *s2 = src;
- reg_char c;
+ char c;
/* Find the end of the string. */
do
diff --git a/libc/debug/strcpy_chk.c b/libc/debug/strcpy_chk.c
index e867754d4..ee22b11cd 100644
--- a/libc/debug/strcpy_chk.c
+++ b/libc/debug/strcpy_chk.c
@@ -28,7 +28,7 @@ __strcpy_chk (dest, src, destlen)
const char *src;
size_t destlen;
{
- reg_char c;
+ char c;
char *s = (char *) src;
const ptrdiff_t off = dest - s;
diff --git a/libc/debug/strncat_chk.c b/libc/debug/strncat_chk.c
index c88034dc4..c26933154 100644
--- a/libc/debug/strncat_chk.c
+++ b/libc/debug/strncat_chk.c
@@ -27,7 +27,7 @@ __strncat_chk (s1, s2, n, s1len)
size_t n;
size_t s1len;
{
- reg_char c;
+ char c;
char *s = s1;
/* Find the end of S1. */
diff --git a/libc/debug/strncpy_chk.c b/libc/debug/strncpy_chk.c
index 674d16033..e34c1e5d6 100644
--- a/libc/debug/strncpy_chk.c
+++ b/libc/debug/strncpy_chk.c
@@ -26,7 +26,7 @@ __strncpy_chk (s1, s2, n, s1len)
size_t n;
size_t s1len;
{
- reg_char c;
+ char c;
char *s = s1;
if (__builtin_expect (s1len < n, 0))
diff --git a/libc/elf/Makefile b/libc/elf/Makefile
index 85691acab..ca071e267 100644
--- a/libc/elf/Makefile
+++ b/libc/elf/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-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
@@ -425,6 +425,7 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
+CFLAGS-rtld.c = $(SYSCONF-FLAGS)
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
diff --git a/libc/elf/dl-load.c b/libc/elf/dl-load.c
index 899d91567..5164894a6 100644
--- a/libc/elf/dl-load.c
+++ b/libc/elf/dl-load.c
@@ -1,5 +1,5 @@
/* Map in a shared object's segments from the file.
- 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
@@ -2198,7 +2198,8 @@ _dl_map_object (struct link_map *loader, const char *name,
if (fd == -1
&& (__builtin_expect (! (mode & __RTLD_SECURE), 1)
- || ! INTUSE(__libc_enable_secure)))
+ || ! INTUSE(__libc_enable_secure))
+ && __builtin_expect (GLRO(dl_inhibit_cache) == 0, 1))
{
/* Check the list of libraries in the file /etc/ld.so.cache,
for compatibility with Linux's ldconfig program. */
diff --git a/libc/elf/dl-lookup.c b/libc/elf/dl-lookup.c
index 441af820a..d8580bccb 100644
--- a/libc/elf/dl-lookup.c
+++ b/libc/elf/dl-lookup.c
@@ -769,7 +769,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__builtin_expect (current_value.s == NULL, 0))
{
if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL)
+ && skip_map == NULL
+ && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
{
/* We could find no value for a strong reference. */
const char *reference_name = undef_map ? undef_map->l_name : "";
diff --git a/libc/elf/dl-support.c b/libc/elf/dl-support.c
index 2307972e6..7f88a2cf7 100644
--- a/libc/elf/dl-support.c
+++ b/libc/elf/dl-support.c
@@ -1,5 +1,5 @@
/* Support for dynamic linking code in static libc.
- Copyright (C) 1996-2008,2009,2010,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
@@ -110,6 +110,8 @@ void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
size_t _dl_pagesize = EXEC_PAGESIZE;
+int _dl_inhibit_cache;
+
unsigned int _dl_osversion;
/* All known directories in sorted order. */
diff --git a/libc/elf/dynamic-link.h b/libc/elf/dynamic-link.h
index aa7122738..44f53b3c7 100644
--- a/libc/elf/dynamic-link.h
+++ b/libc/elf/dynamic-link.h
@@ -251,53 +251,13 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
/* On some machines, notably SPARC, DT_REL* includes DT_JMPREL in its
range. Note that according to the ELF spec, this is completely legal!
- But conditionally define things so that on machines we know this will
- not happen we do something more optimal. */
-# ifdef ELF_MACHINE_PLTREL_OVERLAP
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
- do { \
- struct { ElfW(Addr) start, size; \
- __typeof (((ElfW(Dyn) *) 0)->d_un.d_val) nrelative; int lazy; } \
- ranges[3]; \
- int ranges_index; \
- \
- ranges[0].lazy = ranges[2].lazy = 0; \
- ranges[1].lazy = 1; \
- ranges[0].size = ranges[1].size = ranges[2].size = 0; \
- ranges[0].nrelative = ranges[1].nrelative = ranges[2].nrelative = 0; \
- \
- if ((map)->l_info[DT_##RELOC]) \
- { \
- ranges[0].start = D_PTR ((map), l_info[DT_##RELOC]); \
- ranges[0].size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
- if (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)] != NULL) \
- ranges[0].nrelative \
- = MIN (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)]->d_un.d_val, \
- ranges[0].size / sizeof (ElfW(reloc))); \
- } \
- \
- if ((do_lazy) \
- && (map)->l_info[DT_PLTREL] \
- && (!test_rel || (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC)) \
- { \
- ranges[1].start = D_PTR ((map), l_info[DT_JMPREL]); \
- ranges[1].size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
- ranges[2].start = ranges[1].start + ranges[1].size; \
- ranges[2].size = ranges[0].start + ranges[0].size - ranges[2].start; \
- ranges[0].size = ranges[1].start - ranges[0].start; \
- } \
- \
- for (ranges_index = 0; ranges_index < 3; ++ranges_index) \
- elf_dynamic_do_##reloc ((map), \
- ranges[ranges_index].start, \
- ranges[ranges_index].size, \
- ranges[ranges_index].nrelative, \
- ranges[ranges_index].lazy, \
- skip_ifunc); \
- } while (0)
-# else
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
+ We are guarenteed that we have one of three situations. Either DT_JMPREL
+ comes immediately after DT_REL*, or there is overlap and DT_JMPREL
+ consumes precisely the very end of the DT_REL*, or DT_JMPREL and DT_REL*
+ are completely separate and there is a gap between them. */
+
+# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
do { \
struct { ElfW(Addr) start, size; \
__typeof (((ElfW(Dyn) *) 0)->d_un.d_val) nrelative; int lazy; } \
@@ -316,24 +276,20 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
&& (!test_rel || (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC)) \
{ \
ElfW(Addr) start = D_PTR ((map), l_info[DT_JMPREL]); \
+ ElfW(Addr) size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
\
- if (! ELF_DURING_STARTUP \
- && ((do_lazy) \
- /* This test does not only detect whether the relocation \
- sections are in the right order, it also checks whether \
- there is a DT_REL/DT_RELA section. */ \
- || __builtin_expect (ranges[0].start + ranges[0].size \
- != start, 0))) \
+ if (ranges[0].start + ranges[0].size == (start + size)) \
+ ranges[0].size -= size; \
+ if (! ELF_DURING_STARTUP && ((do_lazy) || ranges[0].size == 0)) \
{ \
ranges[1].start = start; \
- ranges[1].size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
+ ranges[1].size = size; \
ranges[1].lazy = (do_lazy); \
} \
else \
{ \
/* Combine processing the sections. */ \
- assert (ranges[0].start + ranges[0].size == start); \
- ranges[0].size += (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
+ ranges[0].size += size; \
} \
} \
\
@@ -352,7 +308,6 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
skip_ifunc); \
} \
} while (0)
-# endif
# if ELF_MACHINE_NO_REL || ELF_MACHINE_NO_RELA
# define _ELF_CHECK_REL 0
diff --git a/libc/elf/elf.h b/libc/elf/elf.h
index a71de7286..347d6d856 100644
--- a/libc/elf/elf.h
+++ b/libc/elf/elf.h
@@ -1327,6 +1327,7 @@ typedef struct
#define R_SPARC_H34 85
#define R_SPARC_SIZE32 86
#define R_SPARC_SIZE64 87
+#define R_SPARC_WDISP10 88
#define R_SPARC_JMP_IREL 248
#define R_SPARC_IRELATIVE 249
#define R_SPARC_GNU_VTINHERIT 250
diff --git a/libc/elf/pldd-xx.c b/libc/elf/pldd-xx.c
index 6a9edcbd4..cf49c57b1 100644
--- a/libc/elf/pldd-xx.c
+++ b/libc/elf/pldd-xx.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 Ulrich Drepper <drepper@gmail.com>, 2011.
@@ -23,7 +23,7 @@
#define EW_(e, w, t) EW__(e, w, _##t)
#define EW__(e, w, t) e##w##t
-#define static_assert(name, exp) \
+#define pldd_assert(name, exp) \
typedef int __assert_##name[((exp) != 0) - 1]
@@ -39,11 +39,11 @@ struct E(link_map)
EW(Addr) l_libname;
};
#if CLASS == __ELF_NATIVE_CLASS
-static_assert (l_addr, (offsetof (struct link_map, l_addr)
+pldd_assert (l_addr, (offsetof (struct link_map, l_addr)
== offsetof (struct E(link_map), l_addr)));
-static_assert (l_name, (offsetof (struct link_map, l_name)
+pldd_assert (l_name, (offsetof (struct link_map, l_name)
== offsetof (struct E(link_map), l_name)));
-static_assert (l_next, (offsetof (struct link_map, l_next)
+pldd_assert (l_next, (offsetof (struct link_map, l_next)
== offsetof (struct E(link_map), l_next)));
#endif
@@ -54,9 +54,9 @@ struct E(libname_list)
EW(Addr) next;
};
#if CLASS == __ELF_NATIVE_CLASS
-static_assert (name, (offsetof (struct libname_list, name)
+pldd_assert (name, (offsetof (struct libname_list, name)
== offsetof (struct E(libname_list), name)));
-static_assert (next, (offsetof (struct libname_list, next)
+pldd_assert (next, (offsetof (struct libname_list, next)
== offsetof (struct E(libname_list), next)));
#endif
@@ -69,9 +69,9 @@ struct E(r_debug)
EW(Addr) r_map;
};
#if CLASS == __ELF_NATIVE_CLASS
-static_assert (r_version, (offsetof (struct r_debug, r_version)
+pldd_assert (r_version, (offsetof (struct r_debug, r_version)
== offsetof (struct E(r_debug), r_version)));
-static_assert (r_map, (offsetof (struct r_debug, r_map)
+pldd_assert (r_map, (offsetof (struct r_debug, r_map)
== offsetof (struct E(r_debug), r_map)));
#endif
diff --git a/libc/elf/rtld.c b/libc/elf/rtld.c
index 7fb5dc615..352c18df0 100644
--- a/libc/elf/rtld.c
+++ b/libc/elf/rtld.c
@@ -162,6 +162,7 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
._dl_fpu_control = _FPU_DEFAULT,
._dl_pointer_guard = 1,
._dl_pagesize = EXEC_PAGESIZE,
+ ._dl_inhibit_cache = 0,
/* Function pointers. */
._dl_debug_printf = _dl_debug_printf,
@@ -974,6 +975,13 @@ dl_main (const ElfW(Phdr) *phdr,
--_dl_argc;
++INTUSE(_dl_argv);
}
+ else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache"))
+ {
+ GLRO(dl_inhibit_cache) = 1;
+ ++_dl_skip_args;
+ --_dl_argc;
+ ++INTUSE(_dl_argv);
+ }
else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path")
&& _dl_argc > 2)
{
@@ -1023,6 +1031,7 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
+ --inhibit-cache Do not use " LD_SO_CACHE "\n\
--library-path PATH use given PATH instead of content of the environment\n\
variable LD_LIBRARY_PATH\n\
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\
@@ -1968,7 +1977,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
if (dyn->d_tag == DT_NEEDED)
{
l = l->l_next;
-
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ /* Skip the VDSO since it's not part of the list
+ of objects we brought in via DT_NEEDED entries. */
+ if (l == GLRO(dl_sysinfo_map))
+ l = l->l_next;
+#endif
if (!l->l_used)
{
if (first)
@@ -2502,6 +2516,14 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
++dl_debug;
}
+ if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
+ {
+ /* In order to get an accurate picture of whether a particular
+ DT_NEEDED entry is actually used we have to process both
+ the PLT and non-PLT relocation entries. */
+ GLRO(dl_lazy) = 0;
+ }
+
if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
{
size_t cnt;
diff --git a/libc/elf/tst-auditmod1.c b/libc/elf/tst-auditmod1.c
index 67fc758ac..108d6ded5 100644
--- a/libc/elf/tst-auditmod1.c
+++ b/libc/elf/tst-auditmod1.c
@@ -109,7 +109,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
# define La_retval La_i86_retval
# define int_retval lrv_eax
#elif defined __x86_64__
-# ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod3b.c b/libc/elf/tst-auditmod3b.c
index 921eaca55..a9bb0e22c 100644
--- a/libc/elf/tst-auditmod3b.c
+++ b/libc/elf/tst-auditmod3b.c
@@ -105,7 +105,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod4b.c b/libc/elf/tst-auditmod4b.c
index 75e85582b..7778d6a17 100644
--- a/libc/elf/tst-auditmod4b.c
+++ b/libc/elf/tst-auditmod4b.c
@@ -94,7 +94,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod5b.c b/libc/elf/tst-auditmod5b.c
index d2443c8d2..3a4221536 100644
--- a/libc/elf/tst-auditmod5b.c
+++ b/libc/elf/tst-auditmod5b.c
@@ -95,7 +95,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod6b.c b/libc/elf/tst-auditmod6b.c
index b00dcd7c2..a9fe5dcad 100644
--- a/libc/elf/tst-auditmod6b.c
+++ b/libc/elf/tst-auditmod6b.c
@@ -94,7 +94,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod6c.c b/libc/elf/tst-auditmod6c.c
index a78c91396..9b1063b23 100644
--- a/libc/elf/tst-auditmod6c.c
+++ b/libc/elf/tst-auditmod6c.c
@@ -94,7 +94,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+# ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/elf/tst-auditmod7b.c b/libc/elf/tst-auditmod7b.c
index d761149a2..1ae9e7276 100644
--- a/libc/elf/tst-auditmod7b.c
+++ b/libc/elf/tst-auditmod7b.c
@@ -94,7 +94,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#ifdef __LP64__
+#ifndef __ILP32__
# define pltenter la_x86_64_gnu_pltenter
# define pltexit la_x86_64_gnu_pltexit
# define La_regs La_x86_64_regs
diff --git a/libc/iconvdata/tcvn5712-1.c b/libc/iconvdata/tcvn5712-1.c
index 49d5430f2..90c8610f9 100644
--- a/libc/iconvdata/tcvn5712-1.c
+++ b/libc/iconvdata/tcvn5712-1.c
@@ -1,5 +1,5 @@
/* Conversion to and from TCVN5712-1.
- Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -378,8 +378,9 @@ static const struct
/* Determine whether there is a buffered character pending. */ \
last_ch = *statep >> 3; \
\
- /* We have to buffer ch if it is a possible match in comp_table_data. */ \
- must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0); \
+ /* We have to buffer ch if it is a possible match in comp_table_data \
+ and if it isn't the last char of the string. */ \
+ must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0) && (inptr + 1 != inend); \
\
if (last_ch) \
{ \
diff --git a/libc/include/sys/uio.h b/libc/include/sys/uio.h
index 0ec9ab09a..7d67d67c0 100644
--- a/libc/include/sys/uio.h
+++ b/libc/include/sys/uio.h
@@ -3,13 +3,13 @@
#ifndef _ISOMAC
/* Now define the internal interfaces. */
-extern ssize_t __readv (int __fd, const struct iovec *__vector,
+extern ssize_t __readv (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __libc_readv (int __fd, const struct iovec *__vector,
+extern ssize_t __libc_readv (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __writev (int __fd, const struct iovec *__vector,
+extern ssize_t __writev (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __libc_writev (int __fd, const struct iovec *__vector,
+extern ssize_t __libc_writev (int __fd, const struct iovec *__iovec,
int __count);
#endif
#endif
diff --git a/libc/libio/fileops.c b/libc/libio/fileops.c
index 016186e5d..3fb68ab1f 100644
--- a/libc/libio/fileops.c
+++ b/libc/libio/fileops.c
@@ -1349,24 +1349,13 @@ _IO_new_file_xsputn (f, data, n)
{
if (count > to_do)
count = to_do;
- if (count > 20)
- {
#ifdef _LIBC
- f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
#else
- memcpy (f->_IO_write_ptr, s, count);
- f->_IO_write_ptr += count;
+ memcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr += count;
#endif
- s += count;
- }
- else
- {
- register char *p = f->_IO_write_ptr;
- register int i = (int) count;
- while (--i >= 0)
- *p++ = *s++;
- f->_IO_write_ptr = p;
- }
+ s += count;
to_do -= count;
}
if (to_do + must_flush > 0)
diff --git a/libc/libio/libio.h b/libc/libio/libio.h
index 702a666fd..bbfdd9d32 100644
--- a/libc/libio/libio.h
+++ b/libc/libio/libio.h
@@ -346,11 +346,11 @@ extern _IO_FILE *_IO_stderr attribute_hidden;
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
/* Write N bytes pointed to by BUF to COOKIE. Write all N bytes
- unless there is an error. Return number of bytes written, or -1 if
- there is an error without writing anything. If the file has been
- opened for append (__mode.__append set), then set the file pointer
- to the end of the file and then do the write; if not, just write at
- the current file pointer. */
+ unless there is an error. Return number of bytes written. If
+ there is an error, return 0 and do not write anything. If the file
+ has been opened for append (__mode.__append set), then set the file
+ pointer to the end of the file and then do the write; if not, just
+ write at the current file pointer. */
typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
size_t __n);
diff --git a/libc/libio/stdio.h b/libc/libio/stdio.h
index 9ca3ad3a2..8f495141f 100644
--- a/libc/libio/stdio.h
+++ b/libc/libio/stdio.h
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991, 1994-2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1991, 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
@@ -713,7 +713,7 @@ extern size_t fread (void *__restrict __ptr, size_t __size,
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __s) __wur;
+ size_t __n, FILE *__restrict __s);
__END_NAMESPACE_STD
#ifdef __USE_GNU
@@ -737,7 +737,7 @@ extern int fputs_unlocked (const char *__restrict __s,
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) __wur;
extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream) __wur;
+ size_t __n, FILE *__restrict __stream);
#endif
diff --git a/libc/locale/iso-639.def b/libc/locale/iso-639.def
index 17bb9f2ae..c79e9bfeb 100644
--- a/libc/locale/iso-639.def
+++ b/libc/locale/iso-639.def
@@ -160,7 +160,7 @@ DEFINE_LANGUAGE_CODE ("Western Frisian", fy, fry, fry)
DEFINE_LANGUAGE_CODE3 ("Friulian", fur, fur)
DEFINE_LANGUAGE_CODE ("Fulah", ff, ful, ful)
DEFINE_LANGUAGE_CODE ("Gaelic; Scottish Gaelic", gd, gla, gla)
-DEFINE_LANGUAGE_CODE ("Gallegan", gl, glg, glg)
+DEFINE_LANGUAGE_CODE ("Galician", gl, glg, glg)
DEFINE_LANGUAGE_CODE ("Ganda", lg, lug, lug)
DEFINE_LANGUAGE_CODE3 ("Gayo", gay, gay)
DEFINE_LANGUAGE_CODE3 ("Ga", gaa, gaa)
diff --git a/libc/localedata/ChangeLog b/libc/localedata/ChangeLog
index 8567c6cd8..8ab851c2c 100644
--- a/libc/localedata/ChangeLog
+++ b/libc/localedata/ChangeLog
@@ -1,3 +1,24 @@
+2012-04-12 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #3768]
+ * locales/en_GB (LC_TIME): Set am_pm and t_fmt_ampm fields.
+ * locales/cy_GB (LC_TIME): Likewise. Also copy date_fmt from en_GB.
+
+2012-04-04 Jeff Law <law@redhat.com>
+
+ [BZ #6770]
+ * locales/ca_ES (LC_TIME): Add first_weekday and first_workday.
+
+2012-04-04 Petr Baudis <pasky@ucw.cz>
+
+ [BZ #6770]
+ * locales/ca_ES: This locale is now maintained by Jordi Mallach.
+
+2012-04-04 Dmitry V. Levin <ldv@altlinux.org>
+
+ [BZ #10346]
+ * locales/ru_UA (LC_TIME): Add first_weekday and first_workday.
+
2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
[BZ #13673]
diff --git a/libc/localedata/locales/ca_ES b/libc/localedata/locales/ca_ES
index cd83bcca4..35c193667 100644
--- a/libc/localedata/locales/ca_ES
+++ b/libc/localedata/locales/ca_ES
@@ -3,8 +3,8 @@ escape_char /
%
% Catalan Language Locale for Spain
% Source: RAP
-% Contact: Joan Carles Soler
-% Email: Joan.Soler@uv.es
+% Contact: Jordi Mallach
+% Email: jordi@gnu.org
% Tel:
% Fax:
% Language: ca
@@ -138,6 +138,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
diff --git a/libc/localedata/locales/cy_GB b/libc/localedata/locales/cy_GB
index 9615c3f4e..aaffde9f7 100644
--- a/libc/localedata/locales/cy_GB
+++ b/libc/localedata/locales/cy_GB
@@ -248,8 +248,11 @@ mon "<U0049><U006F><U006E><U0061><U0077><U0072>";/
d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "";""
-t_fmt_ampm ""
+am_pm "<U0061><U006D>";"<U0070><U006D>"
+t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
+date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
END LC_TIME
LC_MESSAGES
diff --git a/libc/localedata/locales/en_GB b/libc/localedata/locales/en_GB
index 6a81d6d65..a80a334a6 100644
--- a/libc/localedata/locales/en_GB
+++ b/libc/localedata/locales/en_GB
@@ -116,9 +116,9 @@ mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "";""
-t_fmt_ampm ""
-date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+am_pm "<U0061><U006D>";"<U0070><U006D>"
+t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
+date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
week 7;19971130;4
diff --git a/libc/localedata/locales/ru_UA b/libc/localedata/locales/ru_UA
index c2ca7b17a..2f08d3e15 100644
--- a/libc/localedata/locales/ru_UA
+++ b/libc/localedata/locales/ru_UA
@@ -141,6 +141,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
diff --git a/libc/manual/.gitignore b/libc/manual/.gitignore
index e92cef39b..55c49c998 100644
--- a/libc/manual/.gitignore
+++ b/libc/manual/.gitignore
@@ -27,3 +27,4 @@ stamp-*
summary.texi
texis
top-menu.texi
+version.texi
diff --git a/libc/manual/conf.texi b/libc/manual/conf.texi
index 2cd41f6c7..61dc26031 100644
--- a/libc/manual/conf.texi
+++ b/libc/manual/conf.texi
@@ -360,8 +360,8 @@ Inquire about the parameter corresponding to @code{_POSIX_VERSION}.
@comment unistd.h
@comment POSIX.1
@item _SC_CLK_TCK
-Inquire about the parameter corresponding to @code{CLOCKS_PER_SEC};
-@pxref{CPU Time}.
+Inquire about the number of clock ticks per second; @pxref{CPU Time}.
+The corresponding parameter @code{CLK_TCK} is obsolete.
@comment unistd.h
@comment GNU
diff --git a/libc/manual/filesys.texi b/libc/manual/filesys.texi
index dc570df18..7003f9c47 100644
--- a/libc/manual/filesys.texi
+++ b/libc/manual/filesys.texi
@@ -247,9 +247,11 @@ systems, for most files this the same as the @code{st_ino} member that
@code{stat} will return for the file. @xref{File Attributes}.
@item unsigned char d_namlen
-This is the length of the file name, not including the terminating null
-character. Its type is @code{unsigned char} because that is the integer
-type of the appropriate size
+This is the length of the file name, not including the terminating
+null character. Its type is @code{unsigned char} because that is the
+integer type of the appropriate size. This member is a BSD extension.
+The symbol @code{_DIRENT_HAVE_D_NAMLEN} is defined if this member is
+available.
@item unsigned char d_type
This is the type of the file, possibly unknown. The following constants
@@ -257,7 +259,8 @@ are defined for its value:
@vtable @code
@item DT_UNKNOWN
-The type is unknown. On some systems this is the only value returned.
+The type is unknown. Only some filesystems have full support to
+return the type of the file, others might always return this value.
@item DT_REG
A regular file.
@@ -276,6 +279,9 @@ A character device.
@item DT_BLK
A block device.
+
+@item DT_LNK
+A symbolic link.
@end vtable
This member is a BSD extension. The symbol @code{_DIRENT_HAVE_D_TYPE}
diff --git a/libc/manual/install.texi b/libc/manual/install.texi
index 0fbdd08df..967af65b3 100644
--- a/libc/manual/install.texi
+++ b/libc/manual/install.texi
@@ -448,7 +448,7 @@ reported. Bugs are documented in two places: The file @file{BUGS}
describes a number of well known bugs and the upstream GNU C library
bug tracking system has a
WWW interface at
-@url{http://sources.redhat.com/bugzilla/}. The WWW
+@url{http://sourceware.org/bugzilla/}. The WWW
interface gives you access to open and closed reports. A closed report
normally includes a patch or a hint on solving the problem.
diff --git a/libc/manual/llio.texi b/libc/manual/llio.texi
index b33909fac..acafed315 100644
--- a/libc/manual/llio.texi
+++ b/libc/manual/llio.texi
@@ -78,11 +78,11 @@ declared in @file{unistd.h}.
@comment fcntl.h
@comment POSIX.1
@deftypefun int open (const char *@var{filename}, int @var{flags}[, mode_t @var{mode}])
-The @code{open} function creates and returns a new file descriptor
-for the file named by @var{filename}. Initially, the file position
+The @code{open} function creates and returns a new file descriptor for
+the file named by @var{filename}. Initially, the file position
indicator for the file is at the beginning of the file. The argument
-@var{mode} is used only when a file is created, but it doesn't hurt
-to supply the argument in any case.
+@var{mode} (@pxref{Permission Bits}) is used only when a file is
+created, but it doesn't hurt to supply the argument in any case.
The @var{flags} argument controls how the file is to be opened. This is
a bit mask; you create the value by the bitwise OR of the appropriate
@@ -634,15 +634,15 @@ be one of the symbolic constants @code{SEEK_SET}, @code{SEEK_CUR}, or
@table @code
@item SEEK_SET
-Specifies that @var{whence} is a count of characters from the beginning
+Specifies that @var{offset} is a count of characters from the beginning
of the file.
@item SEEK_CUR
-Specifies that @var{whence} is a count of characters from the current
+Specifies that @var{offset} is a count of characters from the current
file position. This count may be positive or negative.
@item SEEK_END
-Specifies that @var{whence} is a count of characters from the end of
+Specifies that @var{offset} is a count of characters from the end of
the file. A negative count specifies a position within the current
extent of the file; a positive count specifies a position past the
current end. If you set the position past the current end, and
diff --git a/libc/manual/setjmp.texi b/libc/manual/setjmp.texi
index b0cd91ad1..a5a7ce652 100644
--- a/libc/manual/setjmp.texi
+++ b/libc/manual/setjmp.texi
@@ -216,13 +216,14 @@ blocked signals.
@node System V contexts,, Non-Local Exits and Signals, Non-Local Exits
@section Complete Context Control
-The Unix standard one more set of function to control the execution path
-and these functions are more powerful than those discussed in this
-chapter so far. These function were part of the original @w{System V}
-API and by this route were added to the Unix API. Beside on branded
-Unix implementations these interfaces are not widely available. Not all
-platforms and/or architectures @theglibc{} is available on provide
-this interface. Use @file{configure} to detect the availability.
+The Unix standard provides one more set of functions to control the
+execution path and these functions are more powerful than those
+discussed in this chapter so far. These function were part of the
+original @w{System V} API and by this route were added to the Unix
+API. Beside on branded Unix implementations these interfaces are not
+widely available. Not all platforms and/or architectures @theglibc{}
+is available on provide this interface. Use @file{configure} to
+detect the availability.
Similar to the @code{jmp_buf} and @code{sigjmp_buf} types used for the
variables to contain the state of the @code{longjmp} functions the
diff --git a/libc/manual/startup.texi b/libc/manual/startup.texi
index 93dca303c..ed75e7bdc 100644
--- a/libc/manual/startup.texi
+++ b/libc/manual/startup.texi
@@ -335,6 +335,9 @@ definition is added to the environment. Otherwise, the @var{string} is
interpreted as the name of an environment variable, and any definition
for this variable in the environment is removed.
+If the function is successful it returns @code{0}. Otherwise the return
+value is nonzero and @code{errno} is set to indicate the error.
+
The difference to the @code{setenv} function is that the exact string
given as the parameter @var{string} is put into the environment. If the
user should change the string after the @code{putenv} call this will
@@ -364,6 +367,10 @@ the old entry is replaced by the new one.
Please note that you cannot remove an entry completely using this function.
+If the function is successful it returns @code{0}. Otherwise the
+environment is unchanged and the return value is @code{-1} and
+@code{errno} is set.
+
This function was originally part of the BSD library but is now part of
the Unix standard.
@end deftypefun
diff --git a/libc/manual/stdio.texi b/libc/manual/stdio.texi
index 0d23daae2..c58ca22b2 100644
--- a/libc/manual/stdio.texi
+++ b/libc/manual/stdio.texi
@@ -196,13 +196,31 @@ Additional characters may appear after these to specify flags for the
call. Always put the mode (@samp{r}, @samp{w+}, etc.) first; that is
the only part you are guaranteed will be understood by all systems.
-@Theglibc{} defines one additional character for use in
-@var{opentype}: the character @samp{x} insists on creating a new
-file---if a file @var{filename} already exists, @code{fopen} fails
-rather than opening it. If you use @samp{x} you are guaranteed that
-you will not clobber an existing file. This is equivalent to the
-@code{O_EXCL} option to the @code{open} function (@pxref{Opening and
-Closing Files}).
+@Theglibc{} defines additional characters for use in @var{opentype}:
+
+@table @samp
+@item c
+The file is opened with cancellation in the I/O functions disabled.
+
+@item e
+The underlying file descriptor will be closed if you use any of the
+@code{exec@dots{}} functions (@pxref{Executing a File}). (This is
+equivalent to having set @code{FD_CLOEXEC} on that descriptor.
+@xref{Descriptor Flags}.)
+
+@item m
+The file is opened and accessed using @code{mmap}. This is only
+supported with files opened for reading.
+
+@item x
+Insist on creating a new file---if a file @var{filename} already
+exists, @code{fopen} fails rather than opening it. If you use
+@samp{x} you are guaranteed that you will not clobber an existing
+file. This is equivalent to the @code{O_EXCL} option to the
+@code{open} function (@pxref{Opening and Closing Files}).
+
+The @samp{x} modifier is part of @w{ISO C11}.
+@end table
The character @samp{b} in @var{opentype} has a standard meaning; it
requests a binary stream rather than a text stream. But this makes no
@@ -5003,7 +5021,8 @@ ssize_t @var{writer} (void *@var{cookie}, const char *@var{buffer}, size_t @var{
This is very similar to the @code{write} function; see @ref{I/O
Primitives}. Your function should transfer up to @var{size} bytes from
the buffer, and return the number of bytes written. You can return a
-value of @code{-1} to indicate an error.
+value of @code{0} to indicate an error. You must not return any
+negative value.
You should define the function to perform seek operations on the cookie
as:
diff --git a/libc/manual/syslog.texi b/libc/manual/syslog.texi
index 6d338ece8..b978e557d 100644
--- a/libc/manual/syslog.texi
+++ b/libc/manual/syslog.texi
@@ -435,7 +435,7 @@ done. Please read the section on @code{openlog} for more information:
@xref{openlog}.
@code{closelog} does not flush any buffers. You do not have to call
-@code{closelog} before re-opening a Syslog connection with @code{initlog}.
+@code{closelog} before re-opening a Syslog connection with @code{openlog}.
Syslog connections are automatically closed on exec or exit.
@end deftypefun
diff --git a/libc/manual/time.texi b/libc/manual/time.texi
index a410def3e..7dff44f42 100644
--- a/libc/manual/time.texi
+++ b/libc/manual/time.texi
@@ -237,12 +237,6 @@ million independent of the actual resolution.
@end deftypevr
@comment time.h
-@comment POSIX.1
-@deftypevr Macro int CLK_TCK
-This is an obsolete name for @code{CLOCKS_PER_SEC}.
-@end deftypevr
-
-@comment time.h
@comment ISO
@deftp {Data Type} clock_t
This is the type of the value returned by the @code{clock} function.
@@ -306,15 +300,22 @@ these are the actual amounts of time; not relative to any event.
@xref{Creating a Process}.
@end deftp
+@comment time.h
+@comment POSIX.1
+@deftypevr Macro int CLK_TCK
+This is an obsolete name for the number of clock ticks per second. Use
+@code{sysconf (_SC_CLK_TCK)} instead.
+@end deftypevr
+
@comment sys/times.h
@comment POSIX.1
@deftypefun clock_t times (struct tms *@var{buffer})
The @code{times} function stores the processor time information for
the calling process in @var{buffer}.
-The return value is the calling process' CPU time (the same value you
-get from @code{clock()}. @code{times} returns @code{(clock_t)(-1)} to
-indicate failure.
+The return value is the number of clock ticks since an arbitrary point
+in the past, e.g. since system start-up. @code{times} returns
+@code{(clock_t)(-1)} to indicate failure.
@end deftypefun
@strong{Portability Note:} The @code{clock} function described in
diff --git a/libc/math/Makefile b/libc/math/Makefile
index 826acb7a3..25a62e5f2 100644
--- a/libc/math/Makefile
+++ b/libc/math/Makefile
@@ -44,14 +44,16 @@ libm-support = k_standard s_lib_version s_matherr s_signgam \
libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
e_hypot e_j0 e_j1 e_jn e_lgamma_r e_log e_log10 e_pow \
e_rem_pio2 e_remainder e_scalb e_sinh e_sqrt e_gamma_r \
+ e_ilogb \
k_cos k_rem_pio2 k_sin k_tan s_asinh s_atan s_cbrt \
s_ceil s_cos s_erf s_expm1 s_fabs \
- s_floor s_ilogb s_log1p s_logb \
+ s_floor s_log1p s_logb \
s_nextafter s_nexttoward s_rint s_scalbln \
s_significand s_sin s_tan s_tanh w_acos w_acosh w_asin \
w_atan2 w_atanh w_cosh w_drem w_exp w_exp2 w_exp10 w_fmod \
w_tgamma w_hypot w_j0 w_j1 w_jn w_lgamma w_lgamma_r \
w_log w_log10 w_pow w_remainder w_scalb w_sinh w_sqrt \
+ w_ilogb \
s_fpclassify s_fmax s_fmin s_fdim s_nan s_trunc \
s_remquo e_log2 e_exp2 s_round s_nearbyint s_sincos \
conj cimag creal cabs carg s_cexp s_csinh s_ccosh s_clog \
diff --git a/libc/math/libm-test.inc b/libc/math/libm-test.inc
index 5401031ee..258f8b874 100644
--- a/libc/math/libm-test.inc
+++ b/libc/math/libm-test.inc
@@ -2848,6 +2848,36 @@ ctan_test (void)
TEST_c_c (ctan, 0.75L, 1.25L, 0.160807785916206426725166058173438663L, 0.975363285031235646193581759755216379L);
TEST_c_c (ctan, -2, -3, 0.376402564150424829275122113032269084e-2L, -1.00323862735360980144635859782192726L);
+ TEST_c_c (ctan, 1, 45, 1.490158918874345552942703234806348520895e-39L, 1.000000000000000000000000000000000000001L);
+ TEST_c_c (ctan, 1, 47, 2.729321264492904590777293425576722354636e-41L, 1.0);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (ctan, 1, 355, 8.140551093483276762350406321792653551513e-309L, 1.0);
+ TEST_c_c (ctan, 1, 365, 1.677892637497921890115075995898773550884e-317L, 1.0);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (ctan, 1, 5680, 4.725214596136812019616700920476949798307e-4934L, 1.0);
+ TEST_c_c (ctan, 1, 5690, 9.739393181626937151720816611272607059057e-4943L, 1.0);
+#endif
+
+ TEST_c_c (ctan, 0x3.243f6cp-1, 0, -2.287733242885645987394874673945769518150e7L, 0.0);
+
+ TEST_c_c (ctan, 0x1p127, 1, 0.2446359391192790896381501310437708987204L, 0.9101334047676183761532873794426475906201L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (ctan, 0x1p1023, 1, -0.2254627924997545057926782581695274244229L, 0.8786063118883068695462540226219865087189L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (ctan, 0x1p16383L, 1, 0.1608598776370396607204448234354670036772L, 0.8133818522051542536316746743877629761488L);
+#endif
+
+ TEST_c_c (ctan, 50000, 50000, plus_zero, 1.0);
+ TEST_c_c (ctan, 50000, -50000, plus_zero, -1.0);
+ TEST_c_c (ctan, -50000, 50000, minus_zero, 1.0);
+ TEST_c_c (ctan, -50000, -50000, minus_zero, -1.0);
+
END (ctan, complex);
}
@@ -2907,6 +2937,36 @@ ctanh_test (void)
TEST_c_c (ctanh, 0.75L, 1.25L, 1.37260757053378320258048606571226857L, 0.385795952609750664177596760720790220L);
TEST_c_c (ctanh, -2, -3, -0.965385879022133124278480269394560686L, 0.988437503832249372031403430350121098e-2L);
+ TEST_c_c (ctanh, 45, 1, 1.000000000000000000000000000000000000001L, 1.490158918874345552942703234806348520895e-39L);
+ TEST_c_c (ctanh, 47, 1, 1.0, 2.729321264492904590777293425576722354636e-41L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (ctanh, 355, 1, 1.0, 8.140551093483276762350406321792653551513e-309L);
+ TEST_c_c (ctanh, 365, 1, 1.0, 1.677892637497921890115075995898773550884e-317L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (ctanh, 5680, 1, 1.0, 4.725214596136812019616700920476949798307e-4934L);
+ TEST_c_c (ctanh, 5690, 1, 1.0, 9.739393181626937151720816611272607059057e-4943L);
+#endif
+
+ TEST_c_c (ctanh, 0, 0x3.243f6cp-1, 0.0, -2.287733242885645987394874673945769518150e7L);
+
+ TEST_c_c (ctanh, 1, 0x1p127, 0.9101334047676183761532873794426475906201L, 0.2446359391192790896381501310437708987204L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (ctanh, 1, 0x1p1023, 0.8786063118883068695462540226219865087189L, -0.2254627924997545057926782581695274244229L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (ctanh, 1, 0x1p16383L, 0.8133818522051542536316746743877629761488L, 0.1608598776370396607204448234354670036772L);
+#endif
+
+ TEST_c_c (ctanh, 50000, 50000, 1.0, plus_zero);
+ TEST_c_c (ctanh, 50000, -50000, 1.0, minus_zero);
+ TEST_c_c (ctanh, -50000, 50000, -1.0, plus_zero);
+ TEST_c_c (ctanh, -50000, -50000, -1.0, minus_zero);
+
END (ctanh, complex);
}
@@ -3016,8 +3076,7 @@ exp_test (void)
/* Bug 13922: OVERFLOW exception may be missing. */
TEST_f_f (exp, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
- /* Bug 13705: spurious OVERFLOW exception may be present. */
- TEST_f_f (exp, -max_value, 0, OVERFLOW_EXCEPTION_OK);
+ TEST_f_f (exp, -max_value, 0);
END (exp);
}
@@ -3756,13 +3815,22 @@ ilogb_test (void)
TEST_f_i (ilogb, 1024, 10);
TEST_f_i (ilogb, -2000, 10);
- /* XXX We have a problem here: the standard does not tell us whether
- exceptions are allowed/required. ignore them for now. */
-
- TEST_f_i (ilogb, 0.0, FP_ILOGB0, EXCEPTIONS_OK);
- TEST_f_i (ilogb, nan_value, FP_ILOGBNAN, EXCEPTIONS_OK);
- TEST_f_i (ilogb, plus_infty, INT_MAX, EXCEPTIONS_OK);
- TEST_f_i (ilogb, minus_infty, INT_MAX, EXCEPTIONS_OK);
+ /* ilogb (0.0) == FP_ILOGB0 plus invalid exception */
+ errno = 0;
+ TEST_f_i (ilogb, 0.0, FP_ILOGB0, INVALID_EXCEPTION);
+ check_int ("errno for ilogb(0.0) unchanged", errno, EDOM, 0, 0, 0);
+ /* ilogb (NaN) == FP_ILOGBNAN plus invalid exception */
+ errno = 0;
+ TEST_f_i (ilogb, nan_value, FP_ILOGBNAN, INVALID_EXCEPTION);
+ check_int ("errno for ilogb(NaN) unchanged", errno, EDOM, 0, 0, 0);
+ /* ilogb (inf) == INT_MAX plus invalid exception */
+ errno = 0;
+ TEST_f_i (ilogb, plus_infty, INT_MAX, INVALID_EXCEPTION);
+ check_int ("errno for ilogb(Inf) unchanged", errno, EDOM, 0, 0, 0);
+ /* ilogb (-inf) == INT_MAX plus invalid exception */
+ errno = 0;
+ TEST_f_i (ilogb, minus_infty, INT_MAX, INVALID_EXCEPTION);
+ check_int ("errno for ilogb(-Inf) unchanged", errno, EDOM, 0, 0, 0);
END (ilogb);
}
@@ -5635,10 +5703,8 @@ pow_test (void)
TEST_ff_f (pow, 0x1p72L, 0x1p72L, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, 10, -0x1p72L, 0);
- /* Bug 13873: OVERFLOW exception may be missing. */
- TEST_ff_f (pow, max_value, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
- /* Bug 13872: spurious OVERFLOW exception may be present. */
- TEST_ff_f (pow, 10, -max_value, 0, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, max_value, max_value, plus_infty, OVERFLOW_EXCEPTION);
+ TEST_ff_f (pow, 10, -max_value, 0);
TEST_ff_f (pow, 0, 1, 0);
TEST_ff_f (pow, 0, 11, 0);
@@ -5922,8 +5988,7 @@ pow_test (void)
TEST_ff_f (pow, -2.0, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION);
# endif
#endif
- /* Bug 13873: OVERFLOW exception may be missing. */
- TEST_ff_f (pow, -2.0, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -2.0, max_value, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, -max_value, 0.5, nan_value, INVALID_EXCEPTION);
TEST_ff_f (pow, -max_value, 1.5, nan_value, INVALID_EXCEPTION);
@@ -5953,8 +6018,7 @@ pow_test (void)
TEST_ff_f (pow, -max_value, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
# endif
#endif
- /* Bug 13872: spurious OVERFLOW exception may be present. */
- TEST_ff_f (pow, -max_value, -max_value, plus_zero, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -max_value, -max_value, plus_zero);
TEST_ff_f (pow, -max_value, 0xffffff, minus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, -max_value, 0x1fffffe, plus_infty, OVERFLOW_EXCEPTION);
@@ -5976,8 +6040,7 @@ pow_test (void)
TEST_ff_f (pow, -max_value, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION);
# endif
#endif
- /* Bug 13873: OVERFLOW exception may be missing. */
- TEST_ff_f (pow, -max_value, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -max_value, max_value, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, -0.5, 126, 0x1p-126);
TEST_ff_f (pow, -0.5, 127, -0x1p-127);
@@ -6004,8 +6067,7 @@ pow_test (void)
TEST_ff_f (pow, -0.5, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION);
# endif
#endif
- /* Bug 13873: OVERFLOW exception may be missing. */
- TEST_ff_f (pow, -0.5, -max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -0.5, -max_value, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, -0.5, 0xffffff, minus_zero);
TEST_ff_f (pow, -0.5, 0x1fffffe, plus_zero);
@@ -6058,8 +6120,7 @@ pow_test (void)
TEST_ff_f (pow, -min_value, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION);
# endif
#endif
- /* Bug 13873: OVERFLOW exception may be missing. */
- TEST_ff_f (pow, -min_value, -max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -min_value, -max_value, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, -min_value, 0xffffff, minus_zero);
TEST_ff_f (pow, -min_value, 0x1fffffe, plus_zero);
@@ -6081,8 +6142,33 @@ pow_test (void)
TEST_ff_f (pow, -min_value, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
# endif
#endif
- /* Bug 13872: spurious OVERFLOW exception may be present. */
- TEST_ff_f (pow, -min_value, max_value, plus_zero, OVERFLOW_EXCEPTION_OK);
+ TEST_ff_f (pow, -min_value, max_value, plus_zero);
+
+#ifndef TEST_LDOUBLE /* Bug 13881. */
+ TEST_ff_f (pow, 0x0.ffffffp0, 10, 0.999999403953712118183885036774764444747L);
+ TEST_ff_f (pow, 0x0.ffffffp0, 100, 0.999994039553108359406305079606228341585L);
+ TEST_ff_f (pow, 0x0.ffffffp0, 1000, 0.9999403971297699052276650144650733772182L);
+ TEST_ff_f (pow, 0x0.ffffffp0, 0x1p24, 0.3678794302077803437135155590023422899744L);
+ TEST_ff_f (pow, 0x0.ffffffp0, 0x1p30, 1.603807831524924233828134753069728224044e-28L);
+ TEST_ff_f (pow, 0x0.ffffffp0, 0x1.234566p30, 2.374884712135295099971443365381007297732e-32L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -10, 1.000000596046643153205170848674671339688L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -100, 1.000005960482418779499387594989252621451L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -1000, 1.000059606422943986382898964231519867906L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -0x1p24, 2.7182819094701610539628664526874952929416L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -0x1p30, 6.2351609734265057988914412331288163636075e+27L);
+ TEST_ff_f (pow, 0x0.ffffffp0, -0x1.234566p30, 4.2107307141696353498921307077142537353515e+31L);
+ TEST_ff_f (pow, 0x1.000002p0, 0x1p24, 7.3890552180866447284268641248075832310141L);
+ TEST_ff_f (pow, 0x1.000002p0, 0x1.234566p29, 4.2107033006507495188536371520637025716256e+31L);
+ TEST_ff_f (pow, 0x1.000002p0, -0x1.234566p29, 2.3749001736727769098946062325205705312166e-32L);
+#endif
+
+ /* Bug 13881: powl inaccurate so these tests disabled for long double. */
+#if !defined TEST_FLOAT && !defined TEST_LDOUBLE
+ TEST_ff_f (pow, 0x0.fffffffffffff8p0L, 0x1.23456789abcdfp62L, 1.0118762747827252817436395051178295138220e-253L);
+ TEST_ff_f (pow, 0x0.fffffffffffff8p0L, -0x1.23456789abcdfp62L, 9.8826311568054561811190162420900667121992e+252L);
+ TEST_ff_f (pow, 0x1.0000000000001p0L, 0x1.23456789abcdfp61L, 9.8826311568044974397135026217687399395481e+252L);
+ TEST_ff_f (pow, 0x1.0000000000001p0L, -0x1.23456789abcdfp61L, 1.0118762747828234466621210689458255908670e-253L);
+#endif
END (pow);
}
diff --git a/libc/math/s_ctan.c b/libc/math/s_ctan.c
index c838fadeb..78117b310 100644
--- a/libc/math/s_ctan.c
+++ b/libc/math/s_ctan.c
@@ -1,5 +1,5 @@
/* Complex tangent function for double.
- Copyright (C) 1997, 2005, 2011 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.
@@ -20,9 +20,8 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
-
+#include <float.h>
__complex__ double
__ctan (__complex__ double x)
@@ -51,24 +50,45 @@ __ctan (__complex__ double x)
}
else
{
- double sin2rx, cos2rx;
+ double sinrx, cosrx;
double den;
+ const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
- __sincos (2.0 * __real__ x, &sin2rx, &cos2rx);
+ /* 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). */
- den = cos2rx + __ieee754_cosh (2.0 * __imag__ x);
+ __sincos (__real__ x, &sinrx, &cosrx);
- if (den == 0.0)
+ if (fabs (__imag__ x) > t)
{
- __complex__ double ez = __cexp (1.0i * x);
- __complex__ double emz = __cexp (-1.0i * x);
+ /* Avoid intermediate overflow when the real part of the
+ result may be subnormal. Ignoring negligible terms, the
+ imaginary part is +/- 1, the real part is
+ sin(x)*cos(x)/sinh(y)^2 = 4*sin(x)*cos(x)/exp(2y). */
+ double exp_2t = __ieee754_exp (2 * t);
- res = (ez - emz) / (ez + emz) * -1.0i;
+ __imag__ res = __copysign (1.0, __imag__ x);
+ __real__ res = 4 * sinrx * cosrx;
+ __imag__ x = fabs (__imag__ x);
+ __imag__ x -= t;
+ __real__ res /= exp_2t;
+ if (__imag__ x > t)
+ {
+ /* Underflow (original imaginary part of x has absolute
+ value > 2t). */
+ __real__ res /= exp_2t;
+ }
+ else
+ __real__ res /= __ieee754_exp (2 * __imag__ x);
}
else
{
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinh (2.0 * __imag__ x) / den;
+ double sinhix = __ieee754_sinh (__imag__ x);
+ double coshix = __ieee754_cosh (__imag__ x);
+
+ den = cosrx * cosrx + sinhix * sinhix;
+ __real__ res = sinrx * cosrx / den;
+ __imag__ res = sinhix * coshix / den;
}
}
diff --git a/libc/math/s_ctanf.c b/libc/math/s_ctanf.c
index 5f7f28ad0..4cba559a4 100644
--- a/libc/math/s_ctanf.c
+++ b/libc/math/s_ctanf.c
@@ -1,5 +1,5 @@
/* Complex tangent function for float.
- Copyright (C) 1997, 2005, 2011 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.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ float
__ctanf (__complex__ float x)
@@ -50,25 +50,45 @@ __ctanf (__complex__ float x)
}
else
{
- float sin2rx, cos2rx;
+ float sinrx, cosrx;
float den;
+ const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2 / 2);
- __sincosf (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshf (2.0 * __imag__ 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 (den == 0.0)
+ if (fabsf (__imag__ x) > t)
{
- __complex__ float ez = __cexpf (1.0i * x);
- __complex__ float emz = __cexpf (-1.0i * x);
+ /* Avoid intermediate overflow when the real part of the
+ result may be subnormal. Ignoring negligible terms, the
+ imaginary part is +/- 1, the real part is
+ sin(x)*cos(x)/sinh(y)^2 = 4*sin(x)*cos(x)/exp(2y). */
+ float exp_2t = __ieee754_expf (2 * t);
- res = (ez - emz) / (ez + emz) * -1.0i;
+ __imag__ res = __copysignf (1.0, __imag__ x);
+ __real__ res = 4 * sinrx * cosrx;
+ __imag__ x = fabsf (__imag__ x);
+ __imag__ x -= t;
+ __real__ res /= exp_2t;
+ if (__imag__ x > t)
+ {
+ /* Underflow (original imaginary part of x has absolute
+ value > 2t). */
+ __real__ res /= exp_2t;
+ }
+ else
+ __real__ res /= __ieee754_expf (2 * __imag__ x);
}
else
{
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhf (2.0 * __imag__ x) / den;
+ float sinhix = __ieee754_sinhf (__imag__ x);
+ float coshix = __ieee754_coshf (__imag__ x);
+
+ den = cosrx * cosrx + sinhix * sinhix;
+ __real__ res = sinrx * cosrx / den;
+ __imag__ res = sinhix * coshix / den;
}
}
diff --git a/libc/math/s_ctanh.c b/libc/math/s_ctanh.c
index 9cecb8bdb..201871e7e 100644
--- a/libc/math/s_ctanh.c
+++ b/libc/math/s_ctanh.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for double.
- Copyright (C) 1997, 2005, 2011 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.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ double
__ctanh (__complex__ double x)
@@ -50,24 +50,45 @@ __ctanh (__complex__ double x)
}
else
{
- double sin2ix, cos2ix;
+ double sinix, cosix;
double den;
+ const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
- __sincos (2.0 * __imag__ x, &sin2ix, &cos2ix);
+ /* 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). */
- den = (__ieee754_cosh (2.0 * __real__ x) + cos2ix);
+ __sincos (__imag__ x, &sinix, &cosix);
- if (den == 0.0)
+ if (fabs (__real__ x) > t)
{
- __complex__ double ez = __cexp (x);
- __complex__ double emz = __cexp (-x);
+ /* Avoid intermediate overflow when the imaginary part of
+ the result may be subnormal. Ignoring negligible terms,
+ the real part is +/- 1, the imaginary part is
+ sin(y)*cos(y)/sinh(x)^2 = 4*sin(y)*cos(y)/exp(2x). */
+ double exp_2t = __ieee754_exp (2 * t);
- res = (ez - emz) / (ez + emz);
+ __real__ res = __copysign (1.0, __real__ x);
+ __imag__ res = 4 * sinix * cosix;
+ __real__ x = fabs (__real__ x);
+ __real__ x -= t;
+ __imag__ res /= exp_2t;
+ if (__real__ x > t)
+ {
+ /* Underflow (original real part of x has absolute value
+ > 2t). */
+ __imag__ res /= exp_2t;
+ }
+ else
+ __imag__ res /= __ieee754_exp (2 * __real__ x);
}
else
{
- __real__ res = __ieee754_sinh (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
+ double sinhrx = __ieee754_sinh (__real__ x);
+ double coshrx = __ieee754_cosh (__real__ x);
+
+ den = sinhrx * sinhrx + cosix * cosix;
+ __real__ res = sinhrx * coshrx / den;
+ __imag__ res = sinix * cosix / den;
}
}
diff --git a/libc/math/s_ctanhf.c b/libc/math/s_ctanhf.c
index fce5aaf29..e50515577 100644
--- a/libc/math/s_ctanhf.c
+++ b/libc/math/s_ctanhf.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for float.
- Copyright (C) 1997, 2005, 2011 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.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ float
__ctanhf (__complex__ float x)
@@ -50,24 +50,45 @@ __ctanhf (__complex__ float x)
}
else
{
- float sin2ix, cos2ix;
+ float sinix, cosix;
float den;
+ const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2 / 2);
- __sincosf (2.0 * __imag__ x, &sin2ix, &cos2ix);
+ /* 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). */
- den = (__ieee754_coshf (2.0 * __real__ x) + cos2ix);
+ __sincosf (__imag__ x, &sinix, &cosix);
- if (den == 0.0f)
+ if (fabsf (__real__ x) > t)
{
- __complex__ float ez = __cexpf (x);
- __complex__ float emz = __cexpf (-x);
+ /* Avoid intermediate overflow when the imaginary part of
+ the result may be subnormal. Ignoring negligible terms,
+ the real part is +/- 1, the imaginary part is
+ sin(y)*cos(y)/sinh(x)^2 = 4*sin(y)*cos(y)/exp(2x). */
+ float exp_2t = __ieee754_expf (2 * t);
- res = (ez - emz) / (ez + emz);
+ __real__ res = __copysignf (1.0, __real__ x);
+ __imag__ res = 4 * sinix * cosix;
+ __real__ x = fabsf (__real__ x);
+ __real__ x -= t;
+ __imag__ res /= exp_2t;
+ if (__real__ x > t)
+ {
+ /* Underflow (original real part of x has absolute value
+ > 2t). */
+ __imag__ res /= exp_2t;
+ }
+ else
+ __imag__ res /= __ieee754_expf (2 * __real__ x);
}
else
{
- __real__ res = __ieee754_sinhf (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
+ float sinhrx = __ieee754_sinhf (__real__ x);
+ float coshrx = __ieee754_coshf (__real__ x);
+
+ den = sinhrx * sinhrx + cosix * cosix;
+ __real__ res = sinhrx * coshrx / den;
+ __imag__ res = sinix * cosix / den;
}
}
diff --git a/libc/math/s_ctanhl.c b/libc/math/s_ctanhl.c
index d22e13a97..e5d677903 100644
--- a/libc/math/s_ctanhl.c
+++ b/libc/math/s_ctanhl.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for long double.
- Copyright (C) 1997, 2005, 2011 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.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ long double
__ctanhl (__complex__ long double x)
@@ -50,24 +50,45 @@ __ctanhl (__complex__ long double x)
}
else
{
- long double sin2ix, cos2ix;
+ long double sinix, cosix;
long double den;
+ const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
- __sincosl (2.0 * __imag__ x, &sin2ix, &cos2ix);
+ /* 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). */
- den = (__ieee754_coshl (2.0 * __real__ x) + cos2ix);
+ __sincosl (__imag__ x, &sinix, &cosix);
- if (den == 0.0L)
+ if (fabsl (__real__ x) > t)
{
- __complex__ long double ez = __cexpl (x);
- __complex__ long double emz = __cexpl (-x);
+ /* Avoid intermediate overflow when the imaginary part of
+ the result may be subnormal. Ignoring negligible terms,
+ the real part is +/- 1, the imaginary part is
+ sin(y)*cos(y)/sinh(x)^2 = 4*sin(y)*cos(y)/exp(2x). */
+ long double exp_2t = __ieee754_expl (2 * t);
- res = (ez - emz) / (ez + emz);
+ __real__ res = __copysignl (1.0, __real__ x);
+ __imag__ res = 4 * sinix * cosix;
+ __real__ x = fabsl (__real__ x);
+ __real__ x -= t;
+ __imag__ res /= exp_2t;
+ if (__real__ x > t)
+ {
+ /* Underflow (original real part of x has absolute value
+ > 2t). */
+ __imag__ res /= exp_2t;
+ }
+ else
+ __imag__ res /= __ieee754_expl (2 * __real__ x);
}
else
{
- __real__ res = __ieee754_sinhl (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
+ long double sinhrx = __ieee754_sinhl (__real__ x);
+ long double coshrx = __ieee754_coshl (__real__ x);
+
+ den = sinhrx * sinhrx + cosix * cosix;
+ __real__ res = sinhrx * coshrx / den;
+ __imag__ res = sinix * cosix / den;
}
}
diff --git a/libc/math/s_ctanl.c b/libc/math/s_ctanl.c
index 112dd723d..12d700cad 100644
--- a/libc/math/s_ctanl.c
+++ b/libc/math/s_ctanl.c
@@ -1,5 +1,5 @@
/* Complex tangent function for long double.
- Copyright (C) 1997, 2005, 2011 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.
@@ -20,9 +20,8 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
-
+#include <float.h>
__complex__ long double
__ctanl (__complex__ long double x)
@@ -51,25 +50,45 @@ __ctanl (__complex__ long double x)
}
else
{
- long double sin2rx, cos2rx;
+ long double sinrx, cosrx;
long double den;
+ const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
- __sincosl (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshl (2.0 * __imag__ 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 (den == 0.0)
+ if (fabsl (__imag__ x) > t)
{
- __complex__ long double ez = __cexpl (1.0i * x);
- __complex__ long double emz = __cexpl (-1.0i * x);
+ /* Avoid intermediate overflow when the real part of the
+ result may be subnormal. Ignoring negligible terms, the
+ imaginary part is +/- 1, the real part is
+ sin(x)*cos(x)/sinh(y)^2 = 4*sin(x)*cos(x)/exp(2y). */
+ long double exp_2t = __ieee754_expl (2 * t);
- res = (ez - emz) / (ez + emz) * -1.0i;
+ __imag__ res = __copysignl (1.0, __imag__ x);
+ __real__ res = 4 * sinrx * cosrx;
+ __imag__ x = fabsl (__imag__ x);
+ __imag__ x -= t;
+ __real__ res /= exp_2t;
+ if (__imag__ x > t)
+ {
+ /* Underflow (original imaginary part of x has absolute
+ value > 2t). */
+ __real__ res /= exp_2t;
+ }
+ else
+ __real__ res /= __ieee754_expl (2 * __imag__ x);
}
else
{
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhl (2.0 * __imag__ x) / den;
+ long double sinhix = __ieee754_sinhl (__imag__ x);
+ long double coshix = __ieee754_coshl (__imag__ x);
+
+ den = cosrx * cosrx + sinhix * sinhix;
+ __real__ res = sinrx * cosrx / den;
+ __imag__ res = sinhix * coshix / den;
}
}
diff --git a/libc/sysdeps/unix/common/lxstat.c b/libc/math/w_ilogb.c
index 239518523..c87b517c5 100644
--- a/libc/sysdeps/unix/common/lxstat.c
+++ b/libc/math/w_ilogb.c
@@ -1,6 +1,6 @@
-/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@linux.vnet.ibm.com>, 2011.
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,23 +16,27 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <math.h>
#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <bp-checks.h>
-
-extern int __syscall_lstat (const char *__unbounded, struct stat *__unbounded);
+#include <math_private.h>
+/* wrapper ilogb */
int
-__lxstat (int vers, const char *file, struct stat *buf)
+__ilogb (double x)
{
- if (vers != _STAT_VER)
+ int r = __ieee754_ilogb (x);
+ if (__builtin_expect (r == FP_ILOGB0, 0)
+ || __builtin_expect (r == FP_ILOGBNAN, 0)
+ || __builtin_expect (r == INT_MAX, 0))
{
- __set_errno (EINVAL);
- return -1;
+ __set_errno (EDOM);
+ feraiseexcept (FE_INVALID);
}
-
- return __syscall_lstat (CHECK_STRING (file), CHECK_1 (buf));
+ return r;
}
-hidden_def (__lxstat)
-weak_alias (__lxstat, _lxstat)
+
+weak_alias (__ilogb, ilogb)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ilogb, __ilogbl)
+weak_alias (__ilogb, ilogbl)
+#endif
diff --git a/libc/sysdeps/unix/xstat.c b/libc/math/w_ilogbf.c
index 00b60c895..ae3574a75 100644
--- a/libc/sysdeps/unix/xstat.c
+++ b/libc/math/w_ilogbf.c
@@ -1,6 +1,6 @@
-/* xstat using old-style Unix stat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@linux.vnet.ibm.com>, 2011.
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,23 +16,23 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <math.h>
#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <bp-checks.h>
-
-extern int __syscall_stat (const char *__unbounded, struct stat *__unbounded);
+#include <math_private.h>
+/* wrapper ilogbf */
int
-__xstat (int vers, const char *file, struct stat *buf)
+__ilogbf (float x)
{
- if (vers != _STAT_VER)
+ int r = __ieee754_ilogbf (x);
+ if (__builtin_expect (r == FP_ILOGB0, 0)
+ || __builtin_expect (r == FP_ILOGBNAN, 0)
+ || __builtin_expect (r == INT_MAX, 0))
{
- __set_errno (EINVAL);
- return -1;
+ __set_errno (EDOM);
+ feraiseexcept (FE_INVALID);
}
-
- return __syscall_stat (CHECK_STRING (file), CHECK_1 (buf));
+ return r;
}
-hidden_def (__xstat)
-weak_alias (__xstat, _xstat)
+
+weak_alias (__ilogbf, ilogbf)
diff --git a/libc/math/w_ilogbl.c b/libc/math/w_ilogbl.c
new file mode 100644
index 000000000..8c30caa48
--- /dev/null
+++ b/libc/math/w_ilogbl.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@linux.vnet.ibm.com>, 2011.
+
+ 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 <errno.h>
+#include <math_private.h>
+
+/* wrapper ilogbl */
+int
+__ilogbl (long double x)
+{
+ int r = __ieee754_ilogbl (x);
+ if (__builtin_expect (r == FP_ILOGB0, 0)
+ || __builtin_expect (r == FP_ILOGBNAN, 0)
+ || __builtin_expect (r == INT_MAX, 0))
+ {
+ __set_errno (EDOM);
+ feraiseexcept (FE_INVALID);
+ }
+ return r;
+}
+weak_alias (__ilogbl, ilogbl)
diff --git a/libc/nis/nss_compat/compat-initgroups.c b/libc/nis/nss_compat/compat-initgroups.c
index a70d66df8..4aa23fda1 100644
--- a/libc/nis/nss_compat/compat-initgroups.c
+++ b/libc/nis/nss_compat/compat-initgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2004,2006,2007,2009,2010,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
@@ -296,6 +296,8 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
if (nss_initgroups_dyn (user, group, &mystart, &mysize, &mygroups,
limit, errnop) == NSS_STATUS_SUCCESS)
{
+ status = NSS_STATUS_NOTFOUND;
+
/* If there is no blacklist we can trust the underlying
initgroups implementation. */
if (ent->blacklist.current <= 1)
@@ -308,6 +310,7 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
overwrite the pointer with one to a bigger buffer. */
char *tmpbuf = buffer;
size_t tmplen = buflen;
+ bool use_malloc = false;
for (int i = 0; i < mystart; i++)
{
@@ -315,21 +318,36 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
tmpbuf, tmplen, errnop))
== NSS_STATUS_TRYAGAIN
&& *errnop == ERANGE)
- if (tmpbuf == buffer)
- {
- tmplen *= 2;
- tmpbuf = __alloca (tmplen);
- }
- else
- tmpbuf = extend_alloca (tmpbuf, tmplen, 2 * tmplen);
+ {
+ if (__libc_use_alloca (tmplen * 2))
+ {
+ if (tmpbuf == buffer)
+ {
+ tmplen *= 2;
+ tmpbuf = __alloca (tmplen);
+ }
+ else
+ tmpbuf = extend_alloca (tmpbuf, tmplen, tmplen * 2);
+ }
+ else
+ {
+ tmplen *= 2;
+ char *newbuf = realloc (use_malloc ? tmpbuf : NULL, tmplen);
+
+ if (newbuf == NULL)
+ {
+ status = NSS_STATUS_TRYAGAIN;
+ goto done;
+ }
+ use_malloc = true;
+ tmpbuf = newbuf;
+ }
+ }
if (__builtin_expect (status != NSS_STATUS_NOTFOUND, 1))
{
if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0))
- {
- free (mygroups);
- return status;
- }
+ goto done;
if (!in_blacklist (grpbuf.gr_name,
strlen (grpbuf.gr_name), ent)
@@ -347,11 +365,17 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
}
}
}
+
+ status = NSS_STATUS_NOTFOUND;
+
+ done:
+ if (use_malloc)
+ free (tmpbuf);
}
free (mygroups);
- return NSS_STATUS_NOTFOUND;
+ return status;
}
free (mygroups);
@@ -508,6 +532,7 @@ _nss_compat_initgroups_dyn (const char *user, gid_t group, long int *start,
char *tmpbuf;
enum nss_status status;
ent_t intern = { true, false, false, NULL, {NULL, 0, 0} };
+ bool use_malloc = false;
status = internal_setgrent (&intern);
if (status != NSS_STATUS_SUCCESS)
@@ -521,13 +546,32 @@ _nss_compat_initgroups_dyn (const char *user, gid_t group, long int *start,
user, group, start, size,
groupsp, limit, errnop))
== NSS_STATUS_TRYAGAIN && *errnop == ERANGE)
- tmpbuf = extend_alloca (tmpbuf, buflen, 2 * buflen);
+ if (__libc_use_alloca (buflen * 2))
+ tmpbuf = extend_alloca (tmpbuf, buflen, 2 * buflen);
+ else
+ {
+ buflen *= 2;
+ char *newbuf = realloc (use_malloc ? tmpbuf : NULL, buflen);
+ if (newbuf == NULL)
+ {
+ status = NSS_STATUS_TRYAGAIN;
+ goto done;
+ }
+ use_malloc = true;
+ tmpbuf = newbuf;
+ }
}
while (status == NSS_STATUS_SUCCESS);
+ status = NSS_STATUS_SUCCESS;
+
+ done:
+ if (use_malloc)
+ free (tmpbuf);
+
internal_endgrent (&intern);
- return NSS_STATUS_SUCCESS;
+ return status;
}
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog
index 4622393a4..40b01cfac 100644
--- a/libc/nptl/ChangeLog
+++ b/libc/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
+
2012-03-27 David S. Miller <davem@davemloft.net>
* tst-cond16.c (do_test): Use a thread stack size which is either
diff --git a/libc/nptl/sysdeps/x86_64/tls.h b/libc/nptl/sysdeps/x86_64/tls.h
index f644f0daf..454c66a4c 100644
--- a/libc/nptl/sysdeps/x86_64/tls.h
+++ b/libc/nptl/sysdeps/x86_64/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/x86_64 version.
- Copyright (C) 2002-2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2009, 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
@@ -133,13 +133,6 @@ typedef struct
(((tcbhead_t *) (descr))->dtv)
-/* Macros to load from and store into segment registers. */
-# define TLS_GET_FS() \
- ({ int __seg; __asm ("movl %%fs, %0" : "=q" (__seg)); __seg; })
-# define TLS_SET_FS(val) \
- __asm ("movl %0, %%fs" :: "q" (val))
-
-
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched.
diff --git a/libc/nss/Makefile b/libc/nss/Makefile
index 5c93c710f..dad1c9106 100644
--- a/libc/nss/Makefile
+++ b/libc/nss/Makefile
@@ -82,6 +82,8 @@ libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes))
ifeq ($(build-static-nss),yes)
routines += $(libnss_files-routines)
static-only-routines += $(libnss_files-routines)
+tests-static = tst-nss-static
+tests += $(tests-static)
endif
ifneq ($(OPTION_EGLIBC_NSSWITCH),y)
diff --git a/libc/nss/nss_db/db-initgroups.c b/libc/nss/nss_db/db-initgroups.c
index 0d44e00b1..e56f58a44 100644
--- a/libc/nss/nss_db/db-initgroups.c
+++ b/libc/nss/nss_db/db-initgroups.c
@@ -1,5 +1,5 @@
/* Initgroups handling in nss_db 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.
Contributed by Ulrich Drepper <drepper@gmail.com>.
@@ -21,6 +21,7 @@
#include <errno.h>
#include <grp.h>
#include <paths.h>
+#include <string.h>
#include "nss_db.h"
diff --git a/libc/nss/nsswitch.c b/libc/nss/nsswitch.c
index 98f2cb7e7..8e893328e 100644
--- a/libc/nss/nsswitch.c
+++ b/libc/nss/nsswitch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999,2001-2007,2009,2010,2011
+/* 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.
@@ -356,7 +356,7 @@ nss_load_library (service_user *ni)
if (ni->library->lib_handle == NULL)
{
/* Load the shared library. */
- size_t shlen = (7 + strlen (ni->library->name) + 3
+ size_t shlen = (7 + strlen (ni->name) + 3
+ strlen (__nss_shlib_revision) + 1);
int saved_errno = errno;
char shlib_name[shlen];
@@ -364,7 +364,7 @@ nss_load_library (service_user *ni)
/* Construct shared object name. */
__stpcpy (__stpcpy (__stpcpy (__stpcpy (shlib_name,
"libnss_"),
- ni->library->name),
+ ni->name),
".so"),
__nss_shlib_revision);
@@ -378,14 +378,14 @@ nss_load_library (service_user *ni)
else if (is_nscd)
{
/* Call the init function when nscd is used. */
- size_t initlen = (5 + strlen (ni->library->name)
+ size_t initlen = (5 + strlen (ni->name)
+ strlen ("_init") + 1);
char init_name[initlen];
/* Construct the init function name. */
__stpcpy (__stpcpy (__stpcpy (init_name,
"_nss_"),
- ni->library->name),
+ ni->name),
"_init");
/* Find the optional init function. */
@@ -469,13 +469,13 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
else
{
/* Get the desired function. */
- size_t namlen = (5 + strlen (ni->library->name) + 1
+ size_t namlen = (5 + strlen (ni->name) + 1
+ strlen (fct_name) + 1);
char name[namlen];
/* Construct the function name. */
__stpcpy (__stpcpy (__stpcpy (__stpcpy (name, "_nss_"),
- ni->library->name),
+ ni->name),
"_"),
fct_name);
@@ -498,12 +498,12 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
# include "function.def"
{ NULL, NULL }
};
- size_t namlen = (5 + strlen (ni->library->name) + 1
+ size_t namlen = (5 + strlen (ni->name) + 1
+ strlen (fct_name) + 1);
char name[namlen];
/* Construct the function name. */
- __stpcpy (__stpcpy (__stpcpy (name, ni->library->name),
+ __stpcpy (__stpcpy (__stpcpy (name, ni->name),
"_"),
fct_name);
diff --git a/libc/nss/tst-nss-static.c b/libc/nss/tst-nss-static.c
new file mode 100644
index 000000000..98cf073de
--- /dev/null
+++ b/libc/nss/tst-nss-static.c
@@ -0,0 +1,15 @@
+/* glibc test for static NSS. */
+#include <stdio.h>
+
+#define TEST_FUNCTION do_test ()
+static int
+do_test (void)
+{
+ struct passwd *pw;
+
+ pw = getpwuid(0);
+ return pw == NULL;
+}
+
+
+#include "../test-skeleton.c"
diff --git a/libc/po/ru.po b/libc/po/ru.po
index e29702c06..ede6d8048 100644
--- a/libc/po/ru.po
+++ b/libc/po/ru.po
@@ -1120,7 +1120,7 @@ msgstr "ОбÑзательные аргументы Ð´Ð»Ñ Ð´Ð»Ð¸Ð½Ð½Ñ‹Ñ… клю
#: elf/sotruss.ksh:56
msgid "%s: option requires an argument -- '%s'\\n"
-msgstr "%s: ключ должен иÑпользоватьÑÑ Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼ — «%c»\\n"
+msgstr "%s: ключ должен иÑпользоватьÑÑ Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼ — «%s»\\n"
#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134
msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
diff --git a/libc/po/vi.po b/libc/po/vi.po
index ed69b1ec3..c10ae890a 100644
--- a/libc/po/vi.po
+++ b/libc/po/vi.po
@@ -1,21 +1,26 @@
# Vietnamese translation for LibC.
-# Copyright © 2010 Free Software Foundation, Inc.
+# Copyright © 2012 Free Software Foundation, Inc.
# This file is distributed under the same license as the glibc package.
# Clytie Siddall <clytie@riverland.net.au>, 2008-2010.
+# Trần Ngá»c Quân <vnwildman@gmail.com>, 2012.
#
msgid ""
msgstr ""
-"Project-Id-Version: libc 2.11.1\n"
+"Project-Id-Version: libc 2.14\n"
"Report-Msgid-Bugs-To: http://www.gnu.org/software/libc/bugs.html\n"
-"POT-Creation-Date: 2009-02-06 12:40-0800\n"
-"PO-Revision-Date: 2010-04-22 23:22+0930\n"
-"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"POT-Creation-Date: 2011-05-31 00:06-0400\n"
+"PO-Revision-Date: 2012-03-28 14:21+0700\n"
+"Last-Translator: Trần Ngá»c Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: LocFactoryEditor 1.8\n"
+"X-Poedit-Language: Vietnamese\n"
+"X-Poedit-Country: VIET NAM\n"
+"X-Poedit-SourceCharset: utf-8\n"
#: argp/argp-help.c:228
#, c-format
@@ -80,7 +85,7 @@ msgstr "In ra phiên bản chương trình"
#: argp/argp-parse.c:183
msgid "(PROGRAM ERROR) No version known!?"
-msgstr "LỖI CHƯƠNG TRÌNH) Không có phiên bản đã biết ?"
+msgstr "(LỖI CHƯƠNG TRÌNH) Không có phiên bản đã biết!?"
#: argp/argp-parse.c:623
#, c-format
@@ -91,15 +96,19 @@ msgstr "%s: Quá nhiá»u đối số\n"
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(Lá»–I CHƯƠNG TRÃŒNH) Nên nhận biệt tùy chá»n mà chÆ°a?"
-#: assert/assert-perr.c:57
+#: assert/assert-perr.c:37
#, c-format
msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
msgstr "%s%s%s:%u: %s%sGặp lá»—i bất thÆ°á»ng: %s.\n"
-#: assert/assert.c:57
+#: assert/assert.c:105
#, c-format
-msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
-msgstr "%s%s%s:%u: %s%sKhẳng định « %s » bị lỗi.\n"
+msgid ""
+"%s%s%s:%u: %s%sAssertion `%s' failed.\n"
+"%n"
+msgstr ""
+"%s%s%s:%u: %s%sKhẳng định `%s' gặp lỗi.\n"
+"%n"
#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
msgid "NAME"
@@ -135,14 +144,13 @@ msgstr ""
"[TẬP_TIN_XUẤT [TẬP_TIN_NHẬP]...]"
#: catgets/gencat.c:232 debug/pcprofiledump.c:208 debug/xtrace.sh:58
-#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sprof.c:360
-#: iconv/iconv_prog.c:408 iconv/iconvconfig.c:380 locale/programs/locale.c:278
-#: locale/programs/localedef.c:371 login/programs/pt_chown.c:88
-#: malloc/memusage.sh:65 malloc/memusagestat.c:533 nscd/nscd.c:415
-#: nss/getent.c:842 nss/makedb.c:231 posix/getconf.c:1030
-#: sunrpc/rpc_main.c:1494 sunrpc/rpcinfo.c:699
+#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sotruss.ksh:49
+#: elf/sprof.c:371 iconv/iconv_prog.c:408 iconv/iconvconfig.c:380
+#: locale/programs/locale.c:278 locale/programs/localedef.c:371
+#: login/programs/pt_chown.c:92 malloc/memusage.sh:65
+#: malloc/memusagestat.c:539 nscd/nscd.c:415 nss/getent.c:918 nss/makedb.c:231
+#: posix/getconf.c:1122 sunrpc/rpc_main.c:1492 sunrpc/rpcinfo.c:691
#: sysdeps/unix/sysv/linux/lddlibc4.c:62
-#, c-format
msgid ""
"For bug reporting instructions, please see:\n"
"<http://www.gnu.org/software/libc/bugs.html>.\n"
@@ -151,11 +159,11 @@ msgstr ""
"<http://www.gnu.org/software/libc/bugs.html>.\n"
#: catgets/gencat.c:246 debug/pcprofiledump.c:222 debug/xtrace.sh:66
-#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sprof.c:375
+#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sotruss.ksh:76 elf/sprof.c:386
#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:395 locale/programs/locale.c:293
-#: locale/programs/localedef.c:387 login/programs/pt_chown.c:59
-#: malloc/memusage.sh:73 malloc/memusagestat.c:551 nscd/nscd.c:429
-#: nss/getent.c:81 nss/makedb.c:245 posix/getconf.c:1012
+#: locale/programs/localedef.c:387 login/programs/pt_chown.c:63
+#: malloc/memusage.sh:73 malloc/memusagestat.c:557 nscd/nscd.c:429
+#: nss/getent.c:87 nss/makedb.c:245 posix/getconf.c:1104
#: sysdeps/unix/sysv/linux/lddlibc4.c:69
#, c-format
msgid ""
@@ -169,11 +177,11 @@ msgstr ""
"KHẢ NÄ‚NG BÃN HAY KHẢ NÄ‚NG LÀM ÄƯỢC VIỆC DỨT KHOÃT.\n"
#: catgets/gencat.c:251 debug/pcprofiledump.c:227 debug/xtrace.sh:70
-#: elf/ldconfig.c:321 elf/sprof.c:381 iconv/iconv_prog.c:428
+#: elf/ldconfig.c:321 elf/sprof.c:392 iconv/iconv_prog.c:428
#: iconv/iconvconfig.c:400 locale/programs/locale.c:298
#: locale/programs/localedef.c:392 malloc/memusage.sh:77
-#: malloc/memusagestat.c:556 nscd/nscd.c:434 nss/getent.c:86 nss/makedb.c:250
-#: posix/getconf.c:1017
+#: malloc/memusagestat.c:562 nscd/nscd.c:434 nss/getent.c:92 nss/makedb.c:250
+#: posix/getconf.c:1109
#, c-format
msgid "Written by %s.\n"
msgstr "Tác giả: %s.\n"
@@ -293,13 +301,13 @@ msgstr "kích cỡ con trỠkhông hợp lệ"
msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
msgstr "Sử dụng: xtrace [TÙY CHỌN]... CHƯƠNG TRÌNH [TÙY_CHỌN_CHƯƠNG_TRÌNH]...\\n"
-#: debug/xtrace.sh:33
-msgid "Try \\`xtrace --help' for more information.\\n"
-msgstr "Hãy thử lệnh trợ giúp « xtrace --help » để xem thông tin thêm.\\n"
+#: debug/xtrace.sh:33 malloc/memusage.sh:27
+msgid "Try \\`%s --help' or `%s --usage' for more information.\\n"
+msgstr "Hãy thử câu lệnh « %s --help » (trợ giúp) hoặc « %s --usage » (cách sử dụng) để xem thêm thông tin.\\n"
#: debug/xtrace.sh:39
-msgid "xtrace: option \\`$1' requires an argument.\\n"
-msgstr "xtrace: tùy chá»n « $1 » cần thiết đối số.\\n"
+msgid "%s: option '%s' requires an argument.\\n"
+msgstr "%s: tùy chá»n '%s' yêu cầu má»™t tham số.\\n"
#: debug/xtrace.sh:46
msgid ""
@@ -378,7 +386,7 @@ msgstr "Hệ Ä‘iá»u hành không rõ"
msgid ", OS ABI: %s %d.%d.%d"
msgstr ", OS ABI: %s %d.%d.%d"
-#: elf/cache.c:134 elf/ldconfig.c:1289
+#: elf/cache.c:134 elf/ldconfig.c:1305
#, c-format
msgid "Can't open cache file %s\n"
msgstr "Không thể mở tập tin nhớ tạm %s\n"
@@ -418,11 +426,11 @@ msgstr "Lá»—i thay đổi quyá»n truy cập của %s vào %#o"
msgid "Renaming of %s to %s failed"
msgstr "Lỗi thay đổi tên %s thành %s"
-#: elf/dl-close.c:378 elf/dl-open.c:460
+#: elf/dl-close.c:387 elf/dl-open.c:397
msgid "cannot create scope list"
msgstr "không thể tạo danh sách phạm vi"
-#: elf/dl-close.c:725
+#: elf/dl-close.c:767
msgid "shared object not open"
msgstr "chưa mở đối tượng dùng chung"
@@ -430,7 +438,7 @@ msgstr "chưa mở đối tượng dùng chung"
msgid "DST not allowed in SUID/SGID programs"
msgstr "Không cho phép DST trong chương trình kiểu SUID/SGID"
-#: elf/dl-deps.c:127 elf/dl-open.c:282
+#: elf/dl-deps.c:127
msgid "empty dynamic string token substitution"
msgstr "sự thay thế hiệu bài chuỗi động trống"
@@ -443,11 +451,11 @@ msgstr "không thể nạp bổ trợ « %s » do sự thay thế hiệu bài ch
msgid "cannot allocate dependency list"
msgstr "không thể cấp phát danh sách quan hệ phụ thuộc"
-#: elf/dl-deps.c:510 elf/dl-deps.c:565
+#: elf/dl-deps.c:514 elf/dl-deps.c:574
msgid "cannot allocate symbol search list"
msgstr "không thể cấp phát danh sách tìm kiếm ký hiệu"
-#: elf/dl-deps.c:550
+#: elf/dl-deps.c:554
msgid "Filters not supported with LD_TRACE_PRELINKING"
msgstr "Không há»— trợ bá»™ lá»c vá»›i LD_TRACE_PRELINKING"
@@ -471,205 +479,213 @@ msgstr "không thể ánh xạ trang cho bảng fptr"
msgid "internal error: symidx out of range of fptr table"
msgstr "lỗi nội bộ : symidx ở ngoại phạm vi của bảng fptr"
-#: elf/dl-load.c:372
+#: elf/dl-load.c:471
msgid "cannot allocate name record"
msgstr "không thể cấp phát mục ghi tên"
-#: elf/dl-load.c:474 elf/dl-load.c:582 elf/dl-load.c:667 elf/dl-load.c:780
+#: elf/dl-load.c:548 elf/dl-load.c:664 elf/dl-load.c:749 elf/dl-load.c:862
msgid "cannot create cache for search path"
msgstr "không thể tạo bá»™ nhá»› tạm cho Ä‘Æ°á»ng dẫn tìm kiếm"
-#: elf/dl-load.c:565
+#: elf/dl-load.c:639
msgid "cannot create RUNPATH/RPATH copy"
msgstr "không thể tạo bản sao RUNPATH/RPATH"
-#: elf/dl-load.c:653
+#: elf/dl-load.c:735
msgid "cannot create search path array"
msgstr "không thể tạo mảng Ä‘Æ°á»ng dẫn tìm kiếm"
-#: elf/dl-load.c:864
+#: elf/dl-load.c:931
msgid "cannot stat shared object"
msgstr "không thể lấy trạng thái vỠđối tượng dùng chung"
-#: elf/dl-load.c:934
+#: elf/dl-load.c:1009
msgid "cannot open zero fill device"
msgstr "không thể mở thiết bị Ä‘iá»n số không"
-#: elf/dl-load.c:979 elf/dl-load.c:2215
+#: elf/dl-load.c:1055 elf/dl-load.c:2313
msgid "cannot create shared object descriptor"
msgstr "không thể tạo bộ mô tả đối tượng dùng chung"
-#: elf/dl-load.c:998 elf/dl-load.c:1647 elf/dl-load.c:1739
+#: elf/dl-load.c:1074 elf/dl-load.c:1730 elf/dl-load.c:1833
msgid "cannot read file data"
msgstr "không thể Ä‘á»c dữ liệu tập tin"
-#: elf/dl-load.c:1042
+#: elf/dl-load.c:1120
msgid "ELF load command alignment not page-aligned"
msgstr "Sắp hàng câu lệnh nạp ELF không phải sắp hàng theo trang"
-#: elf/dl-load.c:1049
+#: elf/dl-load.c:1127
msgid "ELF load command address/offset not properly aligned"
msgstr "Äịa chỉ/bù của câu lệnh nạp ELF không phải được sắp hàng đúng"
-#: elf/dl-load.c:1132
+#: elf/dl-load.c:1210
msgid "cannot allocate TLS data structures for initial thread"
msgstr "không thể cấp phát cấu trúc dữ liệu TLS đối với mạch đầu tiên"
-#: elf/dl-load.c:1155
+#: elf/dl-load.c:1233
msgid "cannot handle TLS data"
msgstr "không thể xử lý dữ liệu TLS"
-#: elf/dl-load.c:1174
+#: elf/dl-load.c:1252
msgid "object file has no loadable segments"
msgstr "tập tin đối tượng không có đoạn nạp được"
-#: elf/dl-load.c:1210
+#: elf/dl-load.c:1288
msgid "failed to map segment from shared object"
msgstr "lỗi ánh xạ đoạn từ đối tượng dùng chung"
-#: elf/dl-load.c:1236
+#: elf/dl-load.c:1314
msgid "cannot dynamically load executable"
msgstr "không thể nạp động tập tin thực hiện được"
-#: elf/dl-load.c:1298
+#: elf/dl-load.c:1376
msgid "cannot change memory protections"
msgstr "không thể thay đổi sự bảo vệ bộ nhớ"
-#: elf/dl-load.c:1317
+#: elf/dl-load.c:1395
msgid "cannot map zero-fill pages"
msgstr "không thể ánh xạ trang Ä‘iá»n số không"
-#: elf/dl-load.c:1331
+#: elf/dl-load.c:1409
msgid "object file has no dynamic section"
msgstr "tập tin đối tượng không có phần động"
-#: elf/dl-load.c:1354
+#: elf/dl-load.c:1432
msgid "shared object cannot be dlopen()ed"
msgstr "đối tượng dùng chung không thể được dlopen()"
-#: elf/dl-load.c:1367
+#: elf/dl-load.c:1445
msgid "cannot allocate memory for program header"
msgstr "không thể cấp phát bộ nhớ cho phần đầu chương trình"
-#: elf/dl-load.c:1384 elf/dl-open.c:218
+#: elf/dl-load.c:1462 elf/dl-open.c:180
msgid "invalid caller"
msgstr "bá»™ gá»i không hợp lệ"
-#: elf/dl-load.c:1423
+#: elf/dl-load.c:1501
msgid "cannot enable executable stack as shared object requires"
msgstr "không thể hiệu lực đống thực hiện được theo yêu cầu của đối tượng dùng chung"
-#: elf/dl-load.c:1436
+#: elf/dl-load.c:1514
msgid "cannot close file descriptor"
msgstr "không thể đóng bộ mô tả tập tin"
-#: elf/dl-load.c:1647
+#: elf/dl-load.c:1730
msgid "file too short"
msgstr "tập tin quá ngắn"
-#: elf/dl-load.c:1676
+#: elf/dl-load.c:1766
msgid "invalid ELF header"
msgstr "phần đầu ELF không hợp lệ"
-#: elf/dl-load.c:1688
+#: elf/dl-load.c:1778
msgid "ELF file data encoding not big-endian"
msgstr "Bảng mã dữ liệu tập tin ELF không có kiểu vỠcuối lớn"
-#: elf/dl-load.c:1690
+#: elf/dl-load.c:1780
msgid "ELF file data encoding not little-endian"
msgstr "Bảng mã dữ liệu tập tin ELF không có kiểu vá» cuối nhá»"
-#: elf/dl-load.c:1694
+#: elf/dl-load.c:1784
msgid "ELF file version ident does not match current one"
msgstr "ident của phiên bản tập tin ELF không tÆ°Æ¡ng ứng vá»›i Ä‘iá»u hiện thá»i"
-#: elf/dl-load.c:1698
+#: elf/dl-load.c:1788
msgid "ELF file OS ABI invalid"
msgstr "Hệ Ä‘iá»u hành ABI của tập tin ELF không phải hợp lệ"
-#: elf/dl-load.c:1700
+#: elf/dl-load.c:1791
msgid "ELF file ABI version invalid"
msgstr "Phiên bản ABI của tập tin ELF không phải hợp lệ"
-#: elf/dl-load.c:1703
+#: elf/dl-load.c:1794
+msgid "nonzero padding in e_ident"
+msgstr "không có phần đệm số không trong e_ident"
+
+#: elf/dl-load.c:1797
msgid "internal error"
msgstr "lá»—i ná»™i bá»™"
-#: elf/dl-load.c:1710
+#: elf/dl-load.c:1804
msgid "ELF file version does not match current one"
msgstr "Phiên bản tập tin ELF không tÆ°Æ¡ng ứng vá»›i Ä‘iá»u hiện thá»i"
-#: elf/dl-load.c:1718
+#: elf/dl-load.c:1812
msgid "only ET_DYN and ET_EXEC can be loaded"
msgstr "chỉ có thể nạp ET_DYN và ET_EXEC"
-#: elf/dl-load.c:1724
+#: elf/dl-load.c:1818
msgid "ELF file's phentsize not the expected size"
msgstr "kích cỡ phentsize của tập tin ELF là bất thÆ°á»ng"
-#: elf/dl-load.c:2231
+#: elf/dl-load.c:2332
msgid "wrong ELF class: ELFCLASS64"
msgstr "hạng ELF không đúng: ELFCLASS64"
-#: elf/dl-load.c:2232
+#: elf/dl-load.c:2333
msgid "wrong ELF class: ELFCLASS32"
msgstr "hạng ELF không đúng: ELFCLASS32"
-#: elf/dl-load.c:2235
+#: elf/dl-load.c:2336
msgid "cannot open shared object file"
msgstr "không thể mở tập tin đối tượng dùng chung"
-#: elf/dl-lookup.c:356
+#: elf/dl-lookup.c:757
msgid "relocation error"
msgstr "lỗi cấp định vị lại"
-#: elf/dl-lookup.c:384
+#: elf/dl-lookup.c:785
msgid "symbol lookup error"
msgstr "lỗi tra cứu ký hiệu"
-#: elf/dl-open.c:114
+#: elf/dl-open.c:115
msgid "cannot extend global scope"
msgstr "không thể kéo dài phạm vi toàn cục"
-#: elf/dl-open.c:512
+#: elf/dl-open.c:440
msgid "TLS generation counter wrapped! Please report this."
msgstr "Bá»™ đếm tạo TLS đã bao bá»c ! Hãy thông báo."
-#: elf/dl-open.c:549
+#: elf/dl-open.c:462
+msgid "cannot load any more object with static TLS"
+msgstr "không thể tải thêm đối tượng với TLS tĩnh"
+
+#: elf/dl-open.c:511
msgid "invalid mode for dlopen()"
msgstr "chế độ không hợp lệ đối với dlopen()"
-#: elf/dl-open.c:566
+#: elf/dl-open.c:528
msgid "no more namespaces available for dlmopen()"
msgstr "không có sẵn miá»n tên thêm nữa đối vá»›i dlmopen()"
-#: elf/dl-open.c:579
+#: elf/dl-open.c:547
msgid "invalid target namespace in dlmopen()"
msgstr "miá»n tên đích không hợp lệ trong dlmopen()"
-#: elf/dl-reloc.c:121
+#: elf/dl-reloc.c:120
msgid "cannot allocate memory in static TLS block"
msgstr "không thể cấp phát bộ nhớ trong khối TLS tĩnh."
-#: elf/dl-reloc.c:211
+#: elf/dl-reloc.c:212
msgid "cannot make segment writable for relocation"
msgstr "không thể làm cho đoạn có khả năng ghi để định vị lại"
-#: elf/dl-reloc.c:277
+#: elf/dl-reloc.c:275
#, c-format
msgid "%s: no PLTREL found in object %s\n"
msgstr "%s: không tìm thấy PLTREL trong đối tượng %s\n"
-#: elf/dl-reloc.c:288
+#: elf/dl-reloc.c:286
#, c-format
msgid "%s: out of memory to store relocation results for %s\n"
msgstr "%s: không đủ bộ nhớ để cất giữ kết quả định vị lại đối với %s\n"
-#: elf/dl-reloc.c:304
+#: elf/dl-reloc.c:302
msgid "cannot restore segment prot after reloc"
msgstr "không thể phục hồi giao thức (prot) đoạn sau khi định vị lại"
-#: elf/dl-reloc.c:329
+#: elf/dl-reloc.c:331
msgid "cannot apply additional memory protection after relocation"
msgstr "không thể áp dụng sự bảo vệ bộ nhớ thêm sau khi định vị lại"
@@ -677,14 +693,18 @@ msgstr "không thể áp dụng sự bảo vệ bộ nhớ thêm sau khi định
msgid "RTLD_NEXT used in code not dynamically loaded"
msgstr "RTLD_NEXT được dùng trong mã không phải được nạp động"
-#: elf/dl-sysdep.c:481 elf/dl-sysdep.c:493
+#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
msgid "cannot create capability list"
msgstr "không thể tạo danh sách khả năng"
-#: elf/dl-tls.c:864
+#: elf/dl-tls.c:861
msgid "cannot create TLS data structures"
msgstr "không thể tạo các cấu trúc dữ liệu TLS"
+#: elf/dl-version.c:172
+msgid "version lookup error"
+msgstr "lỗi tra cứu phiên bản"
+
#: elf/dl-version.c:303
msgid "cannot allocate version reference table"
msgstr "không thể cấp phát bảng tham chiếu phiên bản"
@@ -767,146 +787,146 @@ msgstr "ÄÆ°á»ng dẫn « %s » được Ä‘Æ°a ra nhiá»u lần"
msgid "%s is not a known library type"
msgstr "« %s » không phải là kiểu thư viện đã biết"
-#: elf/ldconfig.c:404
+#: elf/ldconfig.c:407
#, c-format
msgid "Can't stat %s"
msgstr "Không thể lấy trạng thái vỠ%s"
-#: elf/ldconfig.c:478
+#: elf/ldconfig.c:481
#, c-format
msgid "Can't stat %s\n"
msgstr "Không thể lấy trạng thái vỠ%s\n"
-#: elf/ldconfig.c:488
+#: elf/ldconfig.c:491
#, c-format
msgid "%s is not a symbolic link\n"
msgstr "%s không phải là một liên kết tượng trưng\n"
-#: elf/ldconfig.c:507
+#: elf/ldconfig.c:510
#, c-format
msgid "Can't unlink %s"
msgstr "Không thể bỠliên kết %s"
-#: elf/ldconfig.c:513
+#: elf/ldconfig.c:516
#, c-format
msgid "Can't link %s to %s"
msgstr "Không thể liên kết %s tới %s"
-#: elf/ldconfig.c:519
+#: elf/ldconfig.c:522
msgid " (changed)\n"
msgstr " (đã thay đổi)\n"
-#: elf/ldconfig.c:521
+#: elf/ldconfig.c:524
msgid " (SKIPPED)\n"
msgstr " (BỊ BỎ QUA)\n"
-#: elf/ldconfig.c:576
+#: elf/ldconfig.c:579
#, c-format
msgid "Can't find %s"
msgstr "Không tìm thấy %s"
-#: elf/ldconfig.c:592 elf/ldconfig.c:765 elf/ldconfig.c:813 elf/ldconfig.c:847
+#: elf/ldconfig.c:595 elf/ldconfig.c:768 elf/ldconfig.c:827 elf/ldconfig.c:861
#, c-format
msgid "Cannot lstat %s"
msgstr "Không thể lstat %s"
-#: elf/ldconfig.c:599
+#: elf/ldconfig.c:602
#, c-format
msgid "Ignored file %s since it is not a regular file."
-msgstr "Äã bá» qua tập tin %s vì nó không phải là tập tin chuẩn."
+msgstr "Äã bá» qua tập tin %s vì nó không phải là tập tin thông thÆ°á»ng."
-#: elf/ldconfig.c:608
+#: elf/ldconfig.c:611
#, c-format
msgid "No link created since soname could not be found for %s"
msgstr "Chưa tạo liên kết vì không tìm thấy soname đối với %s"
-#: elf/ldconfig.c:691
+#: elf/ldconfig.c:694
#, c-format
msgid "Can't open directory %s"
msgstr "Không thể mở thư mục %s"
-#: elf/ldconfig.c:779
-#, c-format
-msgid "Cannot stat %s"
-msgstr "Không thể lấy trạng thái vỠ%s"
-
-#: elf/ldconfig.c:834 elf/readlib.c:91
+#: elf/ldconfig.c:786 elf/ldconfig.c:848 elf/readlib.c:91
#, c-format
msgid "Input file %s not found.\n"
msgstr "Không tìm thấy tập tin nhập vào %s.\n"
-#: elf/ldconfig.c:908
+#: elf/ldconfig.c:793
+#, c-format
+msgid "Cannot stat %s"
+msgstr "Không thể lấy trạng thái vỠ%s"
+
+#: elf/ldconfig.c:922
#, c-format
msgid "libc5 library %s in wrong directory"
msgstr "thư viện libc5 %s nằm trong thư mục không đúng"
-#: elf/ldconfig.c:911
+#: elf/ldconfig.c:925
#, c-format
msgid "libc6 library %s in wrong directory"
msgstr "thư viện libc6 %s nằm trong thư mục không đúng"
-#: elf/ldconfig.c:914
+#: elf/ldconfig.c:928
#, c-format
msgid "libc4 library %s in wrong directory"
msgstr "thư viện libc4 %s nằm trong thư mục không đúng"
-#: elf/ldconfig.c:942
+#: elf/ldconfig.c:956
#, c-format
msgid "libraries %s and %s in directory %s have same soname but different type."
msgstr "thư viện %s và %s trong thư mục %s có cùng một soname còn có kiểu khác nhau."
-#: elf/ldconfig.c:1051
+#: elf/ldconfig.c:1065
#, c-format
msgid "Can't open configuration file %s"
msgstr "Không thể mở tập tin cấu hình %s"
-#: elf/ldconfig.c:1115
+#: elf/ldconfig.c:1129
#, c-format
msgid "%s:%u: bad syntax in hwcap line"
msgstr "%s:%u: cú pháp sai trong dòng hwcap"
-#: elf/ldconfig.c:1121
+#: elf/ldconfig.c:1135
#, c-format
msgid "%s:%u: hwcap index %lu above maximum %u"
msgstr "%s:%u: chỉ mục hwcap %lu vượt quá tối đa %u"
-#: elf/ldconfig.c:1128 elf/ldconfig.c:1136
+#: elf/ldconfig.c:1142 elf/ldconfig.c:1150
#, c-format
msgid "%s:%u: hwcap index %lu already defined as %s"
msgstr "%s:%u: chỉ mục hwcap %lu đã được xác định là %s"
-#: elf/ldconfig.c:1139
+#: elf/ldconfig.c:1153
#, c-format
msgid "%s:%u: duplicate hwcap %lu %s"
msgstr "%s:%u: hwcap trùng %lu %s"
-#: elf/ldconfig.c:1161
+#: elf/ldconfig.c:1175
#, c-format
msgid "need absolute file name for configuration file when using -r"
msgstr "dùng tùy chá»n « -r » thì cÅ©ng cần tên tập tin tuyệt đối cho tập tin cấu hình"
-#: elf/ldconfig.c:1168 locale/programs/xmalloc.c:70 malloc/obstack.c:434
-#: malloc/obstack.c:436 posix/getconf.c:985 posix/getconf.c:1177
+#: elf/ldconfig.c:1182 locale/programs/xmalloc.c:70 malloc/obstack.c:434
+#: malloc/obstack.c:436 posix/getconf.c:1077 posix/getconf.c:1297
#, c-format
msgid "memory exhausted"
msgstr "cạn bộ nhớ"
-#: elf/ldconfig.c:1198
+#: elf/ldconfig.c:1214
#, c-format
msgid "%s:%u: cannot read directory %s"
msgstr "%s:%u: không thể Ä‘á»c thÆ° mục %s"
-#: elf/ldconfig.c:1242
+#: elf/ldconfig.c:1258
#, c-format
msgid "relative path `%s' used to build cache"
msgstr "Ä‘Æ°á»ng dẫn tÆ°Æ¡ng đối « %s » được dùng để xây dá»±ng bá»™ nhá»› tạm"
-#: elf/ldconfig.c:1268
+#: elf/ldconfig.c:1284
#, c-format
msgid "Can't chdir to /"
msgstr "Không thể chuyển đổi thư mục (chdir) sang /"
-#: elf/ldconfig.c:1310
+#: elf/ldconfig.c:1325
#, c-format
msgid "Can't open cache file directory %s\n"
msgstr "Không thể mở thư mục nhớ tạm %s\n"
@@ -956,7 +976,7 @@ msgstr "đối số tập tin còn thiếu"
msgid "No such file or directory"
msgstr "Không có tập tin hoặc thư mục như vậy"
-#: elf/ldd.bash.in:153 inet/rcmd.c:483
+#: elf/ldd.bash.in:153 inet/rcmd.c:488
msgid "not regular file"
msgstr "không phải tập tin chuẩn"
@@ -1070,6 +1090,65 @@ msgstr "%s: đích không hợp lệ: %s\n"
msgid "Invalid link from \"%s\" to \"%s\": %s\n"
msgstr "liên kết không hợp lệ từ « %s » đến « %s »: %s\n"
+#: elf/sotruss.ksh:33
+#, sh-format
+msgid ""
+"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST trace calls from objects on FORMLIST\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 print this help and exit\n"
+" --version print version information and exit"
+msgstr ""
+"Cách dùng: sotruss [TUỲ CHỌN...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST lấy dấu viết cuá»™c gá»i từ các đối tượng trong FORMLIST\n"
+" -T, --to TOLIST ghi các dấu vết các cuá»™c gá»i từ đối tượng vào TOLIST\n"
+"\n"
+" -e, --exit đồng thá»i hiển thị cả kết thúc của cú gá»i hàm\n"
+" -f, --follow dấu vết quá trình con\n"
+" -o, --output FILENAME ghi kết xuất ra FILENAME (hay FILENAME.$PID trong trÆ°á»ng hợp\n"
+"\t\t\t -f được sử dụng) thay vì đầu ra lỗi chuẩn\n"
+"\n"
+" --help hiển thị trợ giúp này rồi thoát\n"
+" --version hiển thị thông tin vỠphiên bản rồi thoát"
+
+#: elf/sotruss.ksh:46
+msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
+msgstr "Các đối số uá»· thác sá»­ dụng cùng vá»›i tùy chá»n dài thì cÅ©ng bắt buá»™c vá»›i tùy chá»n ngắn\\ntÆ°Æ¡ng ứng.\\n"
+
+#: elf/sotruss.ksh:56
+msgid "%s: option requires an argument -- '%s'\\n"
+msgstr "%s: tùy chá»n yêu cầu má»™t tham số -- '%s'\\n"
+
+#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134
+msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
+msgstr "Hãy thử câu lệnh « %s --help » (trợ giúp) hoặc « %s --usage » (cách sử dụng) để xem thêm thông tin.\\n"
+
+#: elf/sotruss.ksh:62
+msgid "%s: option is ambiguous; possibilities:"
+msgstr "%s: tùy chá»n chÆ°a rõ ràng; khả năng là:"
+
+#: elf/sotruss.ksh:80
+msgid "Written by %s.\\n"
+msgstr "Tác giả: %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"
+msgstr ""
+"Cách dùng: %s [-ef] [-F TỪ_DANH_SÃCH] [-o TÊN_TỆP_TIN] [-T TỚI_DANH_SÃCH] [--exit]\n"
+"\t [--follow] [--from TỪ_DANH_SÃCH] [--output TÊN_TỆP_TIN] [--to TỚI_DANH_SÃCH]\\n"
+
+#: elf/sotruss.ksh:133
+msgid "%s: unrecognized option '%c%s'\\n"
+msgstr "%s: không nhận diện tùy chá»n '%c%s'\\n"
+
#: elf/sprof.c:77
msgid "Output selection:"
msgstr "Xuất vùng chá»n:"
@@ -1094,92 +1173,92 @@ msgstr "Äá»c và hiển thị dữ liệu theo dõi cách sá»­ dụng tiá»m n
msgid "SHOBJ [PROFDATA]"
msgstr "SHOBJ [Dá»®_LIỆU_ÄO_HIỆU_NÄ‚NG]"
-#: elf/sprof.c:420
+#: elf/sprof.c:431
#, c-format
msgid "failed to load shared object `%s'"
msgstr "lỗi nạp đối tượng dùng chung « %s »"
-#: elf/sprof.c:429
+#: elf/sprof.c:440
#, c-format
msgid "cannot create internal descriptors"
msgstr "không thể tạo bộ mô tả nội bộ"
-#: elf/sprof.c:548
+#: elf/sprof.c:559
#, c-format
msgid "Reopening shared object `%s' failed"
msgstr "Lỗi mở lại đối tượng dùng chung « %s »"
-#: elf/sprof.c:555 elf/sprof.c:649
+#: elf/sprof.c:566 elf/sprof.c:660
#, c-format
msgid "reading of section headers failed"
msgstr "lá»—i Ä‘á»c phần đầu của phần"
-#: elf/sprof.c:563 elf/sprof.c:657
+#: elf/sprof.c:574 elf/sprof.c:668
#, c-format
msgid "reading of section header string table failed"
msgstr "lá»—i Ä‘á»c bảng chuá»—i phần đầu của phần"
-#: elf/sprof.c:589
+#: elf/sprof.c:600
#, c-format
msgid "*** Cannot read debuginfo file name: %m\n"
msgstr "*** Không thể Ä‘á»c tên tập tin chứa thông tin gỡ lá»—i: %m\n"
-#: elf/sprof.c:609
+#: elf/sprof.c:620
#, c-format
msgid "cannot determine file name"
msgstr "không thể quyết định tên tập tin"
-#: elf/sprof.c:642
+#: elf/sprof.c:653
#, c-format
msgid "reading of ELF header failed"
msgstr "lá»—i Ä‘á»c phần đầu ELF"
-#: elf/sprof.c:678
+#: elf/sprof.c:689
#, c-format
msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
msgstr "*** Tập tin « %s » bị tước nên không thể phân tích chi tiết\n"
-#: elf/sprof.c:708
+#: elf/sprof.c:719
#, c-format
msgid "failed to load symbol data"
msgstr "lỗi nạp dữ liệu ký hiệu"
-#: elf/sprof.c:775
+#: elf/sprof.c:784
#, c-format
msgid "cannot load profiling data"
msgstr "không thể nạp dữ liệu đo hiệu năng sử dụng"
-#: elf/sprof.c:784
+#: elf/sprof.c:793
#, c-format
msgid "while stat'ing profiling data file"
msgstr "trong khi lấy trạng thái vỠtập tin dữ liệu do hiệu năng sử dụng"
-#: elf/sprof.c:792
+#: elf/sprof.c:801
#, c-format
msgid "profiling data file `%s' does not match shared object `%s'"
msgstr "tập tin dữ liệu do hiệu năng sử dụng « %s » không tương ứng với đối tượng dùng chung « %s »"
-#: elf/sprof.c:803
+#: elf/sprof.c:812
#, c-format
msgid "failed to mmap the profiling data file"
msgstr "lỗi mmap tập tin dữ liệu do hiệu năng sử dụng"
-#: elf/sprof.c:811
+#: elf/sprof.c:820
#, c-format
msgid "error while closing the profiling data file"
msgstr "gặp lỗi khi đóng tập tin dữ liệu do hiệu năng sử dụng"
-#: elf/sprof.c:820 elf/sprof.c:890
+#: elf/sprof.c:829 elf/sprof.c:927
#, c-format
msgid "cannot create internal descriptor"
msgstr "không thể tạo bộ mô tả nội bộ"
-#: elf/sprof.c:866
+#: elf/sprof.c:903
#, c-format
msgid "`%s' is no correct profile data file for `%s'"
msgstr "« %s » không phải là tập tin dữ liệu do hiệu năng sử dụng đúng đối với « %s »"
-#: elf/sprof.c:1047 elf/sprof.c:1105
+#: elf/sprof.c:1084 elf/sprof.c:1142
#, c-format
msgid "cannot allocate symbol data"
msgstr "không thể cấp phát dữ liệu ký hiệu"
@@ -1369,68 +1448,68 @@ msgstr "trong khi chèn vào cây tìm kiếm"
msgid "cannot generate output file"
msgstr "không thể tạo tập tin kết xuất"
-#: inet/rcmd.c:157
+#: inet/rcmd.c:163
msgid "rcmd: Cannot allocate memory\n"
msgstr "rcmd: Không thể cấp phát bộ nhớ\n"
-#: inet/rcmd.c:172
+#: inet/rcmd.c:178
msgid "rcmd: socket: All ports in use\n"
msgstr "rcmd: ổ cắm: tất cả các cổng đang được dùng\n"
-#: inet/rcmd.c:200
+#: inet/rcmd.c:206
#, c-format
msgid "connect to address %s: "
msgstr "kết nối tới địa chỉ %s: "
-#: inet/rcmd.c:213
+#: inet/rcmd.c:219
#, c-format
msgid "Trying %s...\n"
msgstr "Äang thá»­ %s...\n"
-#: inet/rcmd.c:249
+#: inet/rcmd.c:255
#, c-format
msgid "rcmd: write (setting up stderr): %m\n"
msgstr "rcmd: ghi (đang thiết lập đầu lỗi tiêu chuẩn): %m\n"
-#: inet/rcmd.c:265
+#: inet/rcmd.c:271
#, c-format
msgid "rcmd: poll (setting up stderr): %m\n"
msgstr "rcmd: thăm dò (đang thiết lập đầu lỗi tiêu chuẩn): %m\n"
-#: inet/rcmd.c:268
+#: inet/rcmd.c:274
msgid "poll: protocol failure in circuit setup\n"
msgstr "thăm dò : lỗi giao thức trong thiết lập mạch điện\n"
-#: inet/rcmd.c:301
+#: inet/rcmd.c:306
msgid "socket: protocol failure in circuit setup\n"
msgstr "ổ cắm: lỗi giao thức trong thiết lập mạch điện\n"
-#: inet/rcmd.c:325
+#: inet/rcmd.c:330
#, c-format
msgid "rcmd: %s: short read"
msgstr "rcmd: %s: Ä‘á»c ngắn"
-#: inet/rcmd.c:481
+#: inet/rcmd.c:486
msgid "lstat failed"
msgstr "lstat bị lỗi"
-#: inet/rcmd.c:488
+#: inet/rcmd.c:493
msgid "cannot open"
msgstr "không thể mở"
-#: inet/rcmd.c:490
+#: inet/rcmd.c:495
msgid "fstat failed"
msgstr "fstat bị lỗi"
-#: inet/rcmd.c:492
+#: inet/rcmd.c:497
msgid "bad owner"
msgstr "chủ sai"
-#: inet/rcmd.c:494
+#: inet/rcmd.c:499
msgid "writeable by other than owner"
msgstr "ngÆ°á»i khác vá»›i chủ cÅ©ng có quyá»n ghi vào"
-#: inet/rcmd.c:496
+#: inet/rcmd.c:501
msgid "hard linked somewhere"
msgstr "đã liên kết cứng với một vị trí nào đó"
@@ -1550,8 +1629,8 @@ msgid "no symbolic name given for end of range"
msgstr "chưa đưa ra tên tượng trưng cho kết thúc phạm vi"
#: locale/programs/charmap.c:610 locale/programs/ld-address.c:602
-#: locale/programs/ld-collate.c:2767 locale/programs/ld-collate.c:3924
-#: locale/programs/ld-ctype.c:2232 locale/programs/ld-ctype.c:2984
+#: locale/programs/ld-collate.c:2769 locale/programs/ld-collate.c:3927
+#: locale/programs/ld-ctype.c:2257 locale/programs/ld-ctype.c:3009
#: locale/programs/ld-identification.c:452
#: locale/programs/ld-measurement.c:238 locale/programs/ld-messages.c:332
#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:307
@@ -1577,8 +1656,8 @@ msgid "%s: error in state machine"
msgstr "%s: lỗi trong cơ chế tình trạng"
#: locale/programs/charmap.c:850 locale/programs/ld-address.c:618
-#: locale/programs/ld-collate.c:2764 locale/programs/ld-collate.c:4117
-#: locale/programs/ld-ctype.c:2229 locale/programs/ld-ctype.c:3001
+#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:4120
+#: locale/programs/ld-ctype.c:2254 locale/programs/ld-ctype.c:3026
#: locale/programs/ld-identification.c:468
#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348
#: locale/programs/ld-monetary.c:959 locale/programs/ld-name.c:323
@@ -1599,7 +1678,7 @@ msgstr "không rõ ký tự « %s »"
msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"
msgstr "số byte cho dãy byte ở đầu và cuối của phạm vi không phải là trùng: %d so với %d"
-#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3044
+#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3046
#: locale/programs/repertoire.c:419
msgid "invalid names for character range"
msgstr "tên không hợp lệ cho phạm vi ký tự"
@@ -1621,8 +1700,8 @@ msgstr "giới hạn trên của phạm vi là nhỠhơn giới hạn dưới"
msgid "resulting bytes for range not representable."
msgstr "không thể đại diện số byte kết quả cho phạm vi."
-#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1556
-#: locale/programs/ld-ctype.c:420 locale/programs/ld-identification.c:133
+#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1558
+#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:133
#: locale/programs/ld-measurement.c:94 locale/programs/ld-messages.c:97
#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
#: locale/programs/ld-numeric.c:98 locale/programs/ld-paper.c:91
@@ -1686,7 +1765,7 @@ msgid "%s: numeric country code `%d' not valid"
msgstr "%s: mã quốc gia thuộc số « %d » không phải hợp lệ"
#: locale/programs/ld-address.c:510 locale/programs/ld-address.c:547
-#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2608
+#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2633
#: locale/programs/ld-identification.c:364
#: locale/programs/ld-measurement.c:221 locale/programs/ld-messages.c:301
#: locale/programs/ld-monetary.c:701 locale/programs/ld-monetary.c:736
@@ -1708,8 +1787,8 @@ msgstr "%s: trÆ°á»ng « %s » được tuyên bố nhiá»u lần"
msgid "%s: unknown character in field `%s'"
msgstr "%s: không rõ ký tá»± trong trÆ°á»ng « %s »"
-#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3922
-#: locale/programs/ld-ctype.c:2981 locale/programs/ld-identification.c:449
+#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3925
+#: locale/programs/ld-ctype.c:3006 locale/programs/ld-identification.c:449
#: locale/programs/ld-measurement.c:235 locale/programs/ld-messages.c:330
#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305
#: locale/programs/ld-numeric.c:366 locale/programs/ld-paper.c:239
@@ -1718,12 +1797,12 @@ msgstr "%s: không rõ ký tá»± trong trÆ°á»ng « %s »"
msgid "%s: incomplete `END' line"
msgstr "%s: dòng « END » chưa hoàn toàn"
-#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:542
-#: locale/programs/ld-collate.c:594 locale/programs/ld-collate.c:890
-#: locale/programs/ld-collate.c:903 locale/programs/ld-collate.c:2733
-#: locale/programs/ld-collate.c:2754 locale/programs/ld-collate.c:4107
-#: locale/programs/ld-ctype.c:1960 locale/programs/ld-ctype.c:2219
-#: locale/programs/ld-ctype.c:2806 locale/programs/ld-ctype.c:2992
+#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:544
+#: locale/programs/ld-collate.c:596 locale/programs/ld-collate.c:892
+#: locale/programs/ld-collate.c:905 locale/programs/ld-collate.c:2735
+#: locale/programs/ld-collate.c:2756 locale/programs/ld-collate.c:4110
+#: locale/programs/ld-ctype.c:1985 locale/programs/ld-ctype.c:2244
+#: locale/programs/ld-ctype.c:2831 locale/programs/ld-ctype.c:3017
#: locale/programs/ld-identification.c:459
#: locale/programs/ld-measurement.c:245 locale/programs/ld-messages.c:339
#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:314
@@ -1733,476 +1812,476 @@ msgstr "%s: dòng « END » chưa hoàn toàn"
msgid "%s: syntax error"
msgstr "%s: lỗi cú pháp"
-#: locale/programs/ld-collate.c:417
+#: locale/programs/ld-collate.c:419
#, c-format
msgid "`%.*s' already defined in charmap"
msgstr "« %.*s » đã được xác định trong sơ đồ ký tự"
-#: locale/programs/ld-collate.c:426
+#: locale/programs/ld-collate.c:428
#, c-format
msgid "`%.*s' already defined in repertoire"
msgstr "« %.*s » đã được xác định trong repertoire"
-#: locale/programs/ld-collate.c:433
+#: locale/programs/ld-collate.c:435
#, c-format
msgid "`%.*s' already defined as collating symbol"
msgstr "« %.*s » đã được xác định là ký hiệu đối chiếu"
-#: locale/programs/ld-collate.c:440
+#: locale/programs/ld-collate.c:442
#, c-format
msgid "`%.*s' already defined as collating element"
msgstr "« %.*s » đã được xác định là phần tử đối chiếu"
-#: locale/programs/ld-collate.c:471 locale/programs/ld-collate.c:497
+#: locale/programs/ld-collate.c:473 locale/programs/ld-collate.c:499
#, c-format
msgid "%s: `forward' and `backward' are mutually excluding each other"
msgstr "%s: « forward » (tiếp tới) và « backward » (lùi lại) thì loại từ lẫn nhau"
-#: locale/programs/ld-collate.c:481 locale/programs/ld-collate.c:507
-#: locale/programs/ld-collate.c:523
+#: locale/programs/ld-collate.c:483 locale/programs/ld-collate.c:509
+#: locale/programs/ld-collate.c:525
#, c-format
msgid "%s: `%s' mentioned more than once in definition of weight %d"
msgstr "%s: « %s » được ghi nhiá»u lần để xác định Ä‘á»™ đậm %d"
-#: locale/programs/ld-collate.c:579
+#: locale/programs/ld-collate.c:581
#, c-format
msgid "%s: too many rules; first entry only had %d"
msgstr "%s: quá nhiá»u quy tắc; mục nhập thứ nhất chỉ có %d"
-#: locale/programs/ld-collate.c:615
+#: locale/programs/ld-collate.c:617
#, c-format
msgid "%s: not enough sorting rules"
msgstr "%s: không đủ quy tắc sắp xếp"
-#: locale/programs/ld-collate.c:780
+#: locale/programs/ld-collate.c:782
#, c-format
msgid "%s: empty weight string not allowed"
msgstr "%s: không cho phép chuỗi độ đậm rỗng"
-#: locale/programs/ld-collate.c:875
+#: locale/programs/ld-collate.c:877
#, c-format
msgid "%s: weights must use the same ellipsis symbol as the name"
msgstr "%s: độ đậm phải dùng cùng một ký hiệu dấu chấm lửng với tên"
-#: locale/programs/ld-collate.c:931
+#: locale/programs/ld-collate.c:933
#, c-format
msgid "%s: too many values"
msgstr "%s: quá nhiá»u giá trị"
-#: locale/programs/ld-collate.c:1051 locale/programs/ld-collate.c:1226
+#: locale/programs/ld-collate.c:1053 locale/programs/ld-collate.c:1228
#, c-format
msgid "order for `%.*s' already defined at %s:%Zu"
msgstr "thứ tự « %.*s » đã được xác định ở %s:%Zu"
-#: locale/programs/ld-collate.c:1101
+#: locale/programs/ld-collate.c:1103
#, c-format
msgid "%s: the start and the end symbol of a range must stand for characters"
msgstr "%s: ký hiệu đầu và ký hiệu cuối của một phạm vi phải đại diện ký tự"
-#: locale/programs/ld-collate.c:1128
+#: locale/programs/ld-collate.c:1130
#, c-format
msgid "%s: byte sequences of first and last character must have the same length"
msgstr "%s: dãy byte của ký tá»± đầu và ký tá»± cuối phải có cùng má»™t chiá»u dài"
-#: locale/programs/ld-collate.c:1170
+#: locale/programs/ld-collate.c:1172
#, c-format
msgid "%s: byte sequence of first character of range is not lower than that of the last character"
msgstr "%s: dãy byte của ký tự đầu của phạm vi không phải nhỠhơn ký tự cuối"
-#: locale/programs/ld-collate.c:1295
+#: locale/programs/ld-collate.c:1297
#, c-format
msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
msgstr "%s: dấu chấm lửng phạm vi tượng trưng không thể nằm đúng sau « order_start »"
-#: locale/programs/ld-collate.c:1299
+#: locale/programs/ld-collate.c:1301
#, c-format
msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'"
msgstr "%s: dấu chấm lửng phạm vi tượng trưng không thể nằm đúng trước « order_end »"
-#: locale/programs/ld-collate.c:1319 locale/programs/ld-ctype.c:1477
+#: locale/programs/ld-collate.c:1321 locale/programs/ld-ctype.c:1502
#, c-format
msgid "`%s' and `%.*s' are not valid names for symbolic range"
msgstr "« %s » và « %.*s » không phải là tên hợp lệ cho phạm vi tượng trưng"
-#: locale/programs/ld-collate.c:1369 locale/programs/ld-collate.c:3858
+#: locale/programs/ld-collate.c:1371 locale/programs/ld-collate.c:3861
#, c-format
msgid "%s: order for `%.*s' already defined at %s:%Zu"
msgstr "%s: thứ tự « %.*s » đã được xác định ở %s:%Zu"
-#: locale/programs/ld-collate.c:1378
+#: locale/programs/ld-collate.c:1380
#, c-format
msgid "%s: `%s' must be a character"
msgstr "%s: « %s » phải là một ký tự"
-#: locale/programs/ld-collate.c:1573
+#: locale/programs/ld-collate.c:1575
#, c-format
msgid "%s: `position' must be used for a specific level in all sections or none"
msgstr "%s: « position » (vị trí) phải được dùng cho một cấp cụ thể trong tất cả các phần, hoặc trong không phần gì"
-#: locale/programs/ld-collate.c:1598
+#: locale/programs/ld-collate.c:1600
#, c-format
msgid "symbol `%s' not defined"
msgstr "chưa xác định ký hiệu « %s »"
-#: locale/programs/ld-collate.c:1674 locale/programs/ld-collate.c:1780
+#: locale/programs/ld-collate.c:1676 locale/programs/ld-collate.c:1782
#, c-format
msgid "symbol `%s' has the same encoding as"
msgstr "ký hiệu « %s » có cùng một bảng mã với"
-#: locale/programs/ld-collate.c:1678 locale/programs/ld-collate.c:1784
+#: locale/programs/ld-collate.c:1680 locale/programs/ld-collate.c:1786
#, c-format
msgid "symbol `%s'"
msgstr "ký hiệu « %s »"
-#: locale/programs/ld-collate.c:1826
+#: locale/programs/ld-collate.c:1828
#, c-format
msgid "no definition of `UNDEFINED'"
msgstr "chưa xác định « UNDEFINED »"
-#: locale/programs/ld-collate.c:1855
+#: locale/programs/ld-collate.c:1857
#, c-format
msgid "too many errors; giving up"
msgstr "quá nhiá»u lá»—i nên chịu thua"
-#: locale/programs/ld-collate.c:2659 locale/programs/ld-collate.c:4046
+#: locale/programs/ld-collate.c:2661 locale/programs/ld-collate.c:4049
#, c-format
msgid "%s: nested conditionals not supported"
msgstr "%s: không há»— trợ Ä‘iá»u kiện nhúng"
-#: locale/programs/ld-collate.c:2677
+#: locale/programs/ld-collate.c:2679
#, c-format
msgid "%s: more then one 'else'"
msgstr "%s: nhiá»u Ä‘iá»u kiện « else » (nếu không)"
-#: locale/programs/ld-collate.c:2852
+#: locale/programs/ld-collate.c:2854
#, c-format
msgid "%s: duplicate definition of `%s'"
msgstr "%s: lá»i xác định « %s » trùng"
-#: locale/programs/ld-collate.c:2888
+#: locale/programs/ld-collate.c:2890
#, c-format
msgid "%s: duplicate declaration of section `%s'"
msgstr "%s: lá»i xác định phần « %s » trùng"
-#: locale/programs/ld-collate.c:3024
+#: locale/programs/ld-collate.c:3026
#, c-format
msgid "%s: unknown character in collating symbol name"
msgstr "%s: không rõ ký tự trong tên ký hiệu đối chiếu"
-#: locale/programs/ld-collate.c:3153
+#: locale/programs/ld-collate.c:3155
#, c-format
msgid "%s: unknown character in equivalent definition name"
msgstr "%s: không rõ ký tá»± trong tên lá»i xác định tÆ°Æ¡ng Ä‘Æ°Æ¡ng"
-#: locale/programs/ld-collate.c:3164
+#: locale/programs/ld-collate.c:3166
#, c-format
msgid "%s: unknown character in equivalent definition value"
msgstr "%s: không rõ ký tá»± trong giá trị lá»i xác định tÆ°Æ¡ng Ä‘Æ°Æ¡ng"
-#: locale/programs/ld-collate.c:3174
+#: locale/programs/ld-collate.c:3176
#, c-format
msgid "%s: unknown symbol `%s' in equivalent definition"
msgstr "%s: không rõ ký hiệu « %s » trong lá»i xác định tÆ°Æ¡ng Ä‘Æ°Æ¡ng"
-#: locale/programs/ld-collate.c:3183
+#: locale/programs/ld-collate.c:3185
msgid "error while adding equivalent collating symbol"
msgstr "gặp lỗi khi thêm ký hiệu đối chiếu tương đương"
-#: locale/programs/ld-collate.c:3221
+#: locale/programs/ld-collate.c:3223
#, c-format
msgid "duplicate definition of script `%s'"
msgstr "lá»i xác định văn lệnh « %s » trùng"
-#: locale/programs/ld-collate.c:3269
+#: locale/programs/ld-collate.c:3271
#, c-format
msgid "%s: unknown section name `%.*s'"
msgstr "%s: không rõ tên phần « %.*s »"
-#: locale/programs/ld-collate.c:3298
+#: locale/programs/ld-collate.c:3300
#, c-format
msgid "%s: multiple order definitions for section `%s'"
msgstr "%s: nhiá»u lá»i xác định thứ tá»± cho phần « %s »"
-#: locale/programs/ld-collate.c:3326
+#: locale/programs/ld-collate.c:3328
#, c-format
msgid "%s: invalid number of sorting rules"
msgstr "%s: số quy tắc sắp xếp không hợp lệ"
-#: locale/programs/ld-collate.c:3353
+#: locale/programs/ld-collate.c:3355
#, c-format
msgid "%s: multiple order definitions for unnamed section"
msgstr "%s: nhiá»u lá»i xác định thứ tá»± cho phần không tên"
-#: locale/programs/ld-collate.c:3407 locale/programs/ld-collate.c:3537
-#: locale/programs/ld-collate.c:3900
+#: locale/programs/ld-collate.c:3410 locale/programs/ld-collate.c:3540
+#: locale/programs/ld-collate.c:3903
#, c-format
msgid "%s: missing `order_end' keyword"
msgstr "%s: thiếu từ khoá « order_end »"
-#: locale/programs/ld-collate.c:3470
+#: locale/programs/ld-collate.c:3473
#, c-format
msgid "%s: order for collating symbol %.*s not yet defined"
msgstr "%s: chưa xác định thứ tự cho ký hiệu đối chiếu %.*s"
-#: locale/programs/ld-collate.c:3488
+#: locale/programs/ld-collate.c:3491
#, c-format
msgid "%s: order for collating element %.*s not yet defined"
msgstr "%s: chưa xác định thứ tự cho phần tử đối chiếu %.*s"
-#: locale/programs/ld-collate.c:3499
+#: locale/programs/ld-collate.c:3502
#, c-format
msgid "%s: cannot reorder after %.*s: symbol not known"
msgstr "%s: không thể sắp xếp lại sau %.*s: ký hiệu không rõ"
-#: locale/programs/ld-collate.c:3551 locale/programs/ld-collate.c:3912
+#: locale/programs/ld-collate.c:3554 locale/programs/ld-collate.c:3915
#, c-format
msgid "%s: missing `reorder-end' keyword"
msgstr "%s: thiếu từ khoá « reorder-end »"
-#: locale/programs/ld-collate.c:3585 locale/programs/ld-collate.c:3783
+#: locale/programs/ld-collate.c:3588 locale/programs/ld-collate.c:3786
#, c-format
msgid "%s: section `%.*s' not known"
msgstr "%s: không rõ phần « %.*s »"
-#: locale/programs/ld-collate.c:3650
+#: locale/programs/ld-collate.c:3653
#, c-format
msgid "%s: bad symbol <%.*s>"
msgstr "%s: ký hiệu sai <%.*s>"
-#: locale/programs/ld-collate.c:3846
+#: locale/programs/ld-collate.c:3849
#, c-format
msgid "%s: cannot have `%s' as end of ellipsis range"
msgstr "%s: không thể dùng « %s » làm kết thúc của phạm vi dấu chấm lửng"
-#: locale/programs/ld-collate.c:3896
+#: locale/programs/ld-collate.c:3899
#, c-format
msgid "%s: empty category description not allowed"
msgstr "%s: không cho phép mô tả phân loại rỗng"
-#: locale/programs/ld-collate.c:3915
+#: locale/programs/ld-collate.c:3918
#, c-format
msgid "%s: missing `reorder-sections-end' keyword"
msgstr "%s: thiếu từ khoá « reorder-sections-end »"
-#: locale/programs/ld-collate.c:4079
+#: locale/programs/ld-collate.c:4082
#, c-format
msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
msgstr "%s: « %s » không có « ifdef » hoặc « ifndef » tương ứng"
-#: locale/programs/ld-collate.c:4097
+#: locale/programs/ld-collate.c:4100
#, c-format
msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
msgstr "%s: « endif » không có « ifdef » hoặc « ifndef » tương ứng"
-#: locale/programs/ld-ctype.c:439
+#: locale/programs/ld-ctype.c:440
#, c-format
msgid "No character set name specified in charmap"
msgstr "Chưa xác định tên bộ ký tự trong sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:468
+#: locale/programs/ld-ctype.c:469
#, c-format
msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
msgstr "ký tự L'\\u%0*x' trong hạng « %s » cũng phải nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:483
+#: locale/programs/ld-ctype.c:484
#, c-format
msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
msgstr "ký tự L'\\u%0*x' trong hạng « %s » không thể nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:497 locale/programs/ld-ctype.c:555
+#: locale/programs/ld-ctype.c:498 locale/programs/ld-ctype.c:556
#, c-format
msgid "internal error in %s, line %u"
msgstr "gặp lỗi nội bộ trong %s, dòng %u"
-#: locale/programs/ld-ctype.c:526
+#: locale/programs/ld-ctype.c:527
#, c-format
msgid "character '%s' in class `%s' must be in class `%s'"
msgstr "ký tự « %s » trong hạng « %s » cũng phải nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:542
+#: locale/programs/ld-ctype.c:543
#, c-format
msgid "character '%s' in class `%s' must not be in class `%s'"
msgstr "ký tự « %s » trong hạng « %s » không thể nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:572 locale/programs/ld-ctype.c:610
+#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:611
#, c-format
msgid "<SP> character not in class `%s'"
msgstr "ký tự <SP> không phải nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:584 locale/programs/ld-ctype.c:621
+#: locale/programs/ld-ctype.c:585 locale/programs/ld-ctype.c:622
#, c-format
msgid "<SP> character must not be in class `%s'"
msgstr "ký tự <SP> không thể nằm trong hạng « %s »"
-#: locale/programs/ld-ctype.c:599
+#: locale/programs/ld-ctype.c:600
#, c-format
msgid "character <SP> not defined in character map"
msgstr "ký tự <SP> không phải được xác định trong sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:714
+#: locale/programs/ld-ctype.c:736
#, c-format
msgid "`digit' category has not entries in groups of ten"
msgstr "phân loại « digit » (chữ số) không có mục nhập theo nhóm mÆ°á»i"
-#: locale/programs/ld-ctype.c:763
+#: locale/programs/ld-ctype.c:785
#, c-format
msgid "no input digits defined and none of the standard names in the charmap"
msgstr "chưa xác định chữ số nhập vào hoặc tên tiêu chuẩn trong sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:828
+#: locale/programs/ld-ctype.c:850
#, c-format
msgid "not all characters used in `outdigit' are available in the charmap"
msgstr "không phải tất cả các ký tự được dùng trong « outdigit » cũng sẵn sàng trong sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:845
+#: locale/programs/ld-ctype.c:867
#, c-format
msgid "not all characters used in `outdigit' are available in the repertoire"
msgstr "không phải tất cả các ký tự được dùng trong « outdigit » cũng sẵn sàng trong repertoire"
-#: locale/programs/ld-ctype.c:1245
+#: locale/programs/ld-ctype.c:1270
#, c-format
msgid "character class `%s' already defined"
msgstr "hạng ký tự « %s » đã được xác định"
-#: locale/programs/ld-ctype.c:1251
+#: locale/programs/ld-ctype.c:1276
#, c-format
msgid "implementation limit: no more than %Zd character classes allowed"
msgstr "giới hạn thực hiện: không cho phép vượt quá %Zd hạng ký tự"
-#: locale/programs/ld-ctype.c:1277
+#: locale/programs/ld-ctype.c:1302
#, c-format
msgid "character map `%s' already defined"
msgstr "sơ đồ ký tự « %s » đã được xác định"
-#: locale/programs/ld-ctype.c:1283
+#: locale/programs/ld-ctype.c:1308
#, c-format
msgid "implementation limit: no more than %d character maps allowed"
msgstr "giới hạn thực hiện: không cho phép vượt quá %d sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:1548 locale/programs/ld-ctype.c:1673
-#: locale/programs/ld-ctype.c:1779 locale/programs/ld-ctype.c:2471
-#: locale/programs/ld-ctype.c:3467
+#: locale/programs/ld-ctype.c:1573 locale/programs/ld-ctype.c:1698
+#: locale/programs/ld-ctype.c:1804 locale/programs/ld-ctype.c:2496
+#: locale/programs/ld-ctype.c:3492
#, c-format
msgid "%s: field `%s' does not contain exactly ten entries"
msgstr "%s: trÆ°á»ng « %s » không chứa chính xác mÆ°á»i mục nhập"
-#: locale/programs/ld-ctype.c:1576 locale/programs/ld-ctype.c:2150
+#: locale/programs/ld-ctype.c:1601 locale/programs/ld-ctype.c:2175
#, c-format
msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
msgstr "giá trị Äến <U%0*X> của phạm vi là nhá» hÆ¡n giá trị Từ <U%0*X>"
-#: locale/programs/ld-ctype.c:1703
+#: locale/programs/ld-ctype.c:1728
msgid "start and end character sequence of range must have the same length"
msgstr "dãy ký tá»± đầu và cuối của phạm vi phải có cùng má»™t chiá»u dài"
-#: locale/programs/ld-ctype.c:1710
+#: locale/programs/ld-ctype.c:1735
msgid "to-value character sequence is smaller than from-value sequence"
msgstr "dãy ký tá»± của giá trị Äến là nhá» hÆ¡n dãy ký tá»± của giá trị Từ"
-#: locale/programs/ld-ctype.c:2070 locale/programs/ld-ctype.c:2121
+#: locale/programs/ld-ctype.c:2095 locale/programs/ld-ctype.c:2146
msgid "premature end of `translit_ignore' definition"
msgstr "gặp kết thúc quá sá»›m của lá»i xác định « translit_ignore »"
-#: locale/programs/ld-ctype.c:2076 locale/programs/ld-ctype.c:2127
-#: locale/programs/ld-ctype.c:2169
+#: locale/programs/ld-ctype.c:2101 locale/programs/ld-ctype.c:2152
+#: locale/programs/ld-ctype.c:2194
msgid "syntax error"
msgstr "lỗi cú pháp"
-#: locale/programs/ld-ctype.c:2303
+#: locale/programs/ld-ctype.c:2328
#, c-format
msgid "%s: syntax error in definition of new character class"
msgstr "%s: gặp lá»—i cú pháp trong lá»i xác định của hạng ký tá»± má»›i"
-#: locale/programs/ld-ctype.c:2318
+#: locale/programs/ld-ctype.c:2343
#, c-format
msgid "%s: syntax error in definition of new character map"
msgstr "%s: gặp lá»—i cú pháp trong lá»i xác định của sÆ¡ đồ ký tá»± má»›i"
-#: locale/programs/ld-ctype.c:2493
+#: locale/programs/ld-ctype.c:2518
msgid "ellipsis range must be marked by two operands of same type"
msgstr "phạm vi dấu chấm lửng phải được đánh dấu bằng hai toán hạng cùng kiểu"
-#: locale/programs/ld-ctype.c:2502
+#: locale/programs/ld-ctype.c:2527
msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
msgstr "đối với giá trị tên tượng trưng thì không cho phép dùng dấu chấm lửng tuyệt đối « … »"
-#: locale/programs/ld-ctype.c:2517
+#: locale/programs/ld-ctype.c:2542
msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
msgstr "đối với giá trị phạm vi UCS thì phải dùng dấu chấm lửng tượng trưng thập lục « .. »"
-#: locale/programs/ld-ctype.c:2531
+#: locale/programs/ld-ctype.c:2556
msgid "with character code range values one must use the absolute ellipsis `...'"
msgstr "đối với giá trị phạm vi mã ký tự thì phải dùng dấu chấm lửng tuyệt đối « … »"
-#: locale/programs/ld-ctype.c:2682
+#: locale/programs/ld-ctype.c:2707
#, c-format
msgid "duplicated definition for mapping `%s'"
msgstr "gặp lá»i xác định trùng của sá»± ánh xạ « %s »"
-#: locale/programs/ld-ctype.c:2768 locale/programs/ld-ctype.c:2912
+#: locale/programs/ld-ctype.c:2793 locale/programs/ld-ctype.c:2937
#, c-format
msgid "%s: `translit_start' section does not end with `translit_end'"
msgstr "%s: phần « translit_start » không kết thúc với « translit_end »"
-#: locale/programs/ld-ctype.c:2863
+#: locale/programs/ld-ctype.c:2888
#, c-format
msgid "%s: duplicate `default_missing' definition"
msgstr "%s: lá»i xác định « default_missing » trùng"
-#: locale/programs/ld-ctype.c:2868
+#: locale/programs/ld-ctype.c:2893
msgid "previous definition was here"
msgstr "lá»i xác định trÆ°á»›c ở đây"
-#: locale/programs/ld-ctype.c:2890
+#: locale/programs/ld-ctype.c:2915
#, c-format
msgid "%s: no representable `default_missing' definition found"
msgstr "%s: không tìm thấy lá»i xác định « default_missing » có thể đại diện"
-#: locale/programs/ld-ctype.c:3043 locale/programs/ld-ctype.c:3127
-#: locale/programs/ld-ctype.c:3147 locale/programs/ld-ctype.c:3168
-#: locale/programs/ld-ctype.c:3189 locale/programs/ld-ctype.c:3210
-#: locale/programs/ld-ctype.c:3231 locale/programs/ld-ctype.c:3271
-#: locale/programs/ld-ctype.c:3292 locale/programs/ld-ctype.c:3359
-#: locale/programs/ld-ctype.c:3401 locale/programs/ld-ctype.c:3426
+#: locale/programs/ld-ctype.c:3068 locale/programs/ld-ctype.c:3152
+#: locale/programs/ld-ctype.c:3172 locale/programs/ld-ctype.c:3193
+#: locale/programs/ld-ctype.c:3214 locale/programs/ld-ctype.c:3235
+#: locale/programs/ld-ctype.c:3256 locale/programs/ld-ctype.c:3296
+#: locale/programs/ld-ctype.c:3317 locale/programs/ld-ctype.c:3384
+#: locale/programs/ld-ctype.c:3426 locale/programs/ld-ctype.c:3451
#, c-format
msgid "%s: character `%s' not defined while needed as default value"
msgstr "%s: chưa xác định ký tự « %s » mà cần thiết làm giá trị mặc định"
-#: locale/programs/ld-ctype.c:3048 locale/programs/ld-ctype.c:3132
-#: locale/programs/ld-ctype.c:3152 locale/programs/ld-ctype.c:3173
-#: locale/programs/ld-ctype.c:3194 locale/programs/ld-ctype.c:3215
-#: locale/programs/ld-ctype.c:3236 locale/programs/ld-ctype.c:3276
-#: locale/programs/ld-ctype.c:3297 locale/programs/ld-ctype.c:3364
+#: locale/programs/ld-ctype.c:3073 locale/programs/ld-ctype.c:3157
+#: locale/programs/ld-ctype.c:3177 locale/programs/ld-ctype.c:3198
+#: locale/programs/ld-ctype.c:3219 locale/programs/ld-ctype.c:3240
+#: locale/programs/ld-ctype.c:3261 locale/programs/ld-ctype.c:3301
+#: locale/programs/ld-ctype.c:3322 locale/programs/ld-ctype.c:3389
#, c-format
msgid "%s: character `%s' in charmap not representable with one byte"
msgstr "%s: ký tự « %s » trong sơ đồ ký tự không thể được đại diện dùng một byte"
-#: locale/programs/ld-ctype.c:3408 locale/programs/ld-ctype.c:3433
+#: locale/programs/ld-ctype.c:3433 locale/programs/ld-ctype.c:3458
#, c-format
msgid "%s: character `%s' needed as default value not representable with one byte"
msgstr "%s: ký tự « %s » cần thiết làm giá trị mặc định mà không thể được đại diện dùng một byte"
-#: locale/programs/ld-ctype.c:3489
+#: locale/programs/ld-ctype.c:3514
#, c-format
msgid "no output digits defined and none of the standard names in the charmap"
msgstr "chưa xác định chữ số kết xuất hoặc tên tiêu chuẩn trong sơ đồ ký tự"
-#: locale/programs/ld-ctype.c:3780
+#: locale/programs/ld-ctype.c:3805
#, c-format
msgid "%s: transliteration data from locale `%s' not available"
msgstr "%s: không có sẵn dữ liệu chuyển chữ từ miá»n địa phÆ°Æ¡ng « %s »"
-#: locale/programs/ld-ctype.c:3881
+#: locale/programs/ld-ctype.c:3906
#, c-format
msgid "%s: table for class \"%s\": %lu bytes\n"
msgstr "%s: bảng cho hạng « %s »: %lu byte\n"
-#: locale/programs/ld-ctype.c:3950
+#: locale/programs/ld-ctype.c:3975
#, c-format
msgid "%s: table for map \"%s\": %lu bytes\n"
msgstr "%s: bảng cho sơ đồ « %s »: %lu byte\n"
-#: locale/programs/ld-ctype.c:4083
+#: locale/programs/ld-ctype.c:4108
#, c-format
msgid "%s: table for width: %lu bytes\n"
msgstr "%s: bảng cho chiá»u rá»™ng: %lu byte\n"
@@ -2396,6 +2475,11 @@ msgstr "ký hiệu « %.*s » không nằm trong sơ đồ ký tự"
msgid "symbol `%.*s' not in repertoire map"
msgstr "ký hiệu « %.*s » không nằm trong sơ đồ repertoire"
+#: locale/programs/locale-spec.c:131
+#, c-format
+msgid "unknown name \"%s\""
+msgstr "không hiểu tên \"%s\""
+
#: locale/programs/locale.c:74
msgid "System information:"
msgstr "Thông tin hệ thống:"
@@ -2568,13 +2652,13 @@ msgstr "không thể ghi tập tin kết xuất vào « %s »"
#, c-format
msgid ""
"System's directory for character maps : %s\n"
-" repertoire maps: %s\n"
-" locale path : %s\n"
+"\t\t repertoire maps: %s\n"
+"\t\t locale path : %s\n"
"%s"
msgstr ""
"Thư mục của hệ thống cho sơ đồ ký tự : %s\n"
-"\t\tsơ đồ repertoire: %s\n"
-"\t\tÄ‘Æ°á»ng dẫn miá»n địa phÆ°Æ¡ng: %s\n"
+"\t\t sơ đồ repertoire: %s\n"
+"\t\t Ä‘Æ°á»ng dẫn miá»n địa phÆ°Æ¡ng: %s\n"
"%s"
#: locale/programs/localedef.c:567
@@ -2587,130 +2671,135 @@ msgstr "quan hệ phụ thuá»™c vòng tròn giữa các lá»i xác định miá»
msgid "cannot add already read locale `%s' a second time"
msgstr "không thể thêm lần thứ hai miá»n địa phÆ°Æ¡ng đã Ä‘á»c « %s »"
-#: locale/programs/locarchive.c:88 locale/programs/locarchive.c:261
+#: locale/programs/locarchive.c:92 locale/programs/locarchive.c:338
#, c-format
msgid "cannot create temporary file"
msgstr "không thể tạo tập tin tạm thá»i"
-#: locale/programs/locarchive.c:118 locale/programs/locarchive.c:307
+#: locale/programs/locarchive.c:122 locale/programs/locarchive.c:384
#, c-format
msgid "cannot initialize archive file"
msgstr "không thể khởi tạo tập tin kho lưu"
-#: locale/programs/locarchive.c:125 locale/programs/locarchive.c:314
+#: locale/programs/locarchive.c:129 locale/programs/locarchive.c:391
#, c-format
msgid "cannot resize archive file"
msgstr "không thể thay đổi kích cỡ của tập tin kho lưu"
-#: locale/programs/locarchive.c:134 locale/programs/locarchive.c:323
-#: locale/programs/locarchive.c:527
+#: locale/programs/locarchive.c:152 locale/programs/locarchive.c:414
+#: locale/programs/locarchive.c:633
#, c-format
msgid "cannot map archive header"
msgstr "không thể ánh xạ phần đầu của kho lưu"
-#: locale/programs/locarchive.c:156
+#: locale/programs/locarchive.c:174
#, c-format
msgid "failed to create new locale archive"
msgstr "lá»—i tạo kho lÆ°u miá»n địa phÆ°Æ¡ng má»›i"
-#: locale/programs/locarchive.c:168
+#: locale/programs/locarchive.c:186
#, c-format
msgid "cannot change mode of new locale archive"
msgstr "không thể chuyển đổi chế Ä‘á»™ của kho lÆ°u miá»n địa phÆ°Æ¡ng má»›i"
-#: locale/programs/locarchive.c:255
+#: locale/programs/locarchive.c:285
+#, c-format
+msgid "cannot read data from locale archive"
+msgstr "không thể Ä‘á»c dữ liệu từ kho lÆ°u miá»n địa phÆ°Æ¡ng"
+
+#: locale/programs/locarchive.c:318
#, c-format
msgid "cannot map locale archive file"
msgstr "không thể ánh xạ tập tin kho lưu"
-#: locale/programs/locarchive.c:331
+#: locale/programs/locarchive.c:422
#, c-format
msgid "cannot lock new archive"
msgstr "không thể khoá kho lưu mới"
-#: locale/programs/locarchive.c:396
+#: locale/programs/locarchive.c:488
#, c-format
msgid "cannot extend locale archive file"
msgstr "không thể kéo dài tập tin kho lÆ°u miá»n địa phÆ°Æ¡ng"
-#: locale/programs/locarchive.c:405
+#: locale/programs/locarchive.c:497
#, c-format
msgid "cannot change mode of resized locale archive"
msgstr "không thể chuyển đổi chế Ä‘á»™ của kho lÆ°u miá»n địa phÆ°Æ¡ng có kích cỡ đã thay đổi"
-#: locale/programs/locarchive.c:413
+#: locale/programs/locarchive.c:505
#, c-format
msgid "cannot rename new archive"
msgstr "không thể thay đổi tên của kho lưu mới"
-#: locale/programs/locarchive.c:466
+#: locale/programs/locarchive.c:558
#, c-format
msgid "cannot open locale archive \"%s\""
msgstr "không thể mở kho lÆ°u miá»n địa phÆ°Æ¡ng « %s »"
-#: locale/programs/locarchive.c:471
+#: locale/programs/locarchive.c:563
#, c-format
msgid "cannot stat locale archive \"%s\""
msgstr "không thể lấy trạng thái vá» kho lÆ°u miá»n địa phÆ°Æ¡ng « %s »"
-#: locale/programs/locarchive.c:490
+#: locale/programs/locarchive.c:582
#, c-format
msgid "cannot lock locale archive \"%s\""
msgstr "không thể khoá kho lÆ°u miá»n địa phÆ°Æ¡ng « %s »"
-#: locale/programs/locarchive.c:513
+#: locale/programs/locarchive.c:605
#, c-format
msgid "cannot read archive header"
msgstr "không thể Ä‘á»c phần đầu của kho lÆ°u"
-#: locale/programs/locarchive.c:573
+#: locale/programs/locarchive.c:680
#, c-format
msgid "locale '%s' already exists"
msgstr "miá»n địa phÆ°Æ¡ng « %s » đã có."
-#: locale/programs/locarchive.c:804 locale/programs/locarchive.c:819
-#: locale/programs/locarchive.c:831 locale/programs/locarchive.c:843
+#: locale/programs/locarchive.c:942 locale/programs/locarchive.c:957
+#: locale/programs/locarchive.c:969 locale/programs/locarchive.c:981
#: locale/programs/locfile.c:344
#, c-format
msgid "cannot add to locale archive"
msgstr "không thể thêm vào kho lÆ°u miá»n địa phÆ°Æ¡ng"
-#: locale/programs/locarchive.c:998
+#: locale/programs/locarchive.c:1139
#, c-format
msgid "locale alias file `%s' not found"
msgstr "không tìm thấy tập tin bí danh miá»n địa phÆ°Æ¡ng « %s »"
-#: locale/programs/locarchive.c:1142
+#: locale/programs/locarchive.c:1289
#, c-format
msgid "Adding %s\n"
msgstr "Äang thêm « %s »\n"
-#: locale/programs/locarchive.c:1148
+#: locale/programs/locarchive.c:1295
#, c-format
msgid "stat of \"%s\" failed: %s: ignored"
msgstr "lỗi lấy trạng thái vỠ« %s »: %s: bị bỠqua"
-#: locale/programs/locarchive.c:1154
+#: locale/programs/locarchive.c:1301
#, c-format
msgid "\"%s\" is no directory; ignored"
msgstr "« %s » không phải là thư mục nên bị bỠqua"
-#: locale/programs/locarchive.c:1161
+#: locale/programs/locarchive.c:1308
#, c-format
msgid "cannot open directory \"%s\": %s: ignored"
msgstr "không thể mở thư mục « %s »: %s: bị bỠqua"
-#: locale/programs/locarchive.c:1233
+#: locale/programs/locarchive.c:1380
#, c-format
msgid "incomplete set of locale files in \"%s\""
msgstr "tập hợp tập tin miá»n địa phÆ°Æ¡ng chÆ°a hoàn toàn trong « %s »"
-#: locale/programs/locarchive.c:1297
+#: locale/programs/locarchive.c:1444
#, c-format
msgid "cannot read all files in \"%s\": ignored"
msgstr "không thể Ä‘á»c tất cả các tập tin trong « %s »: bị bá» qua"
-#: locale/programs/locarchive.c:1367
+#: locale/programs/locarchive.c:1514
#, c-format
msgid "locale \"%s\" not in archive"
msgstr "miá»n địa phÆ°Æ¡ng « %s » không nằm trong kho lÆ°u"
@@ -2776,12 +2865,12 @@ msgstr "không thể lưu sơ đồ repertoire mới"
msgid "repertoire map file `%s' not found"
msgstr "không tìm thấy tập tin sơ đồ repertoire « %s »"
-#: login/programs/pt_chown.c:74
+#: login/programs/pt_chown.c:78
#, 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 "Äặt chủ, nhóm và quyá»n truy cập của thiết bị cuối ảo phụ để tÆ°Æ¡ng ứng vá»›i thiết bị cuối ảo chính được nhập dùng bá»™ mô tả tập tin « %d ». Äây là chÆ°Æ¡ng trình bổ trợ cho hàm « grantpt ». Nó không dá»± định được chạy trá»±c tiếp từ dòng lệnh.\n"
-#: login/programs/pt_chown.c:84
+#: login/programs/pt_chown.c:88
#, 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"
@@ -2794,43 +2883,39 @@ msgstr ""
"\n"
"%s"
-#: login/programs/pt_chown.c:161
+#: login/programs/pt_chown.c:192
#, c-format
msgid "too many arguments"
msgstr "quá nhiá»u đối số"
-#: login/programs/pt_chown.c:169
+#: login/programs/pt_chown.c:200
#, c-format
msgid "needs to be installed setuid `root'"
msgstr "cần phải được cài đặt một cách « setuid root »"
-#: malloc/mcheck.c:330
+#: malloc/mcheck.c:350
msgid "memory is consistent, library is buggy\n"
msgstr "bộ nhớ nhất quán mà thư viện chứa lỗi\n"
-#: malloc/mcheck.c:333
+#: malloc/mcheck.c:353
msgid "memory clobbered before allocated block\n"
msgstr "đang ghi đè vào bộ nhớ được dành riêng cho hệ thống, đằng trước khối đã cấp phát cho bạn\n"
-#: malloc/mcheck.c:336
+#: malloc/mcheck.c:356
msgid "memory clobbered past end of allocated block\n"
msgstr "đang ghi đè vào bộ nhớ được dành riêng cho hệ thống, đằng sau khối đã cấp phát cho bạn\n"
-#: malloc/mcheck.c:339
+#: malloc/mcheck.c:359
msgid "block freed twice\n"
msgstr "khối được giải phóng hai lần\n"
-#: malloc/mcheck.c:342
+#: malloc/mcheck.c:362
msgid "bogus mcheck_status, library is buggy\n"
msgstr "trạng thái mcheck_status giả, thư viện chứa lỗi\n"
-#: malloc/memusage.sh:27
-msgid "Try \\`memusage --help' for more information."
-msgstr "Hãy thử lệnh trợ giúp « memusage --help » để xem thông tin thêm."
-
#: malloc/memusage.sh:33
-msgid "memusage: option \\`$1' requires an argument"
-msgstr "memusage: tùy chá»n « $1 » cần thiết đối số"
+msgid "%s: option '%s' requires an argument\\n"
+msgstr "%s: tùy chá»n '%s' yêu cầu má»™t tham số \\n"
#: malloc/memusage.sh:39
msgid ""
@@ -2889,14 +2974,14 @@ msgstr ""
#: malloc/memusage.sh:101
msgid ""
"Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
-" [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
-" [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
-" PROGRAM [PROGRAMOPTION]..."
+"\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
+"\t PROGRAM [PROGRAMOPTION]..."
msgstr ""
"Cú pháp: memusage [--data=TẬP_TIN] [--progname=TÊN] [--png=TẬP_TIN] [--unbuffered]\n"
-" [--buffer=Cá» ] [--no-timer] [--time-based] [--total]\n"
-" [--title=CHUá»–I] [--x-size=Cá» ] [--y-size=Cá» ]\n"
-" CHƯƠNG_TRÌNH [TÙY_CHỌN_CHƯƠNG_TRÌNH]..."
+"\t [--buffer=Cá» ] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=CHUá»–I] [--x-size=Cá» ] [--y-size=Cá» ]\n"
+"\t CHƯƠNG_TRÌNH [TÙY_CHỌN_CHƯƠNG_TRÌNH]..."
#: malloc/memusage.sh:193
msgid "memusage: option \\`${1##*=}' is ambiguous"
@@ -2950,7 +3035,7 @@ msgstr "Gặp lỗi hệ thống không rõ"
msgid "unable to free arguments"
msgstr "không thể giải phóng đối số"
-#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:133
+#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132
#: sysdeps/gnu/errlist.c:20
msgid "Success"
msgstr "Thành công"
@@ -3480,7 +3565,7 @@ msgstr "netname2user: (nis+ tra cứu): %s\n"
#: nis/nss_nisplus/nisplus-publickey.c:321
#, c-format
msgid "netname2user: DES entry for %s in directory %s not unique"
-msgstr "netname2user: mục nhập DES cho %s trong thư mục %s không phải duy nhất"
+msgstr "netname2user: mục DES cho %s trong thư mục %s không phải duy nhất"
#: nis/nss_nisplus/nisplus-publickey.c:339
#, c-format
@@ -3490,7 +3575,7 @@ msgstr "netname2user: tên chính « %s » quá dài"
#: nis/nss_nisplus/nisplus-publickey.c:395
#, c-format
msgid "netname2user: LOCAL entry for %s in directory %s not unique"
-msgstr "netname2user: mục nhập LOCAL cho %s trong thư mục %s không phải duy nhất"
+msgstr "netname2user: mục LOCAL cho %s trong thư mục %s không phải duy nhất"
#: nis/nss_nisplus/nisplus-publickey.c:402
msgid "netname2user: should not have uid 0"
@@ -3584,12 +3669,12 @@ msgstr "yp_update: không thể chuyển đổi máy sang netname\n"
msgid "yp_update: cannot get server address\n"
msgstr "yp_update: không thể lấy địa chỉ của máy phục vụ\n"
-#: nscd/aicache.c:82 nscd/hstcache.c:481
+#: nscd/aicache.c:83 nscd/hstcache.c:492
#, c-format
msgid "Haven't found \"%s\" in hosts cache!"
msgstr "Không tìm thấy « %s » trong bộ nhớ tạm các máy phục vụ !"
-#: nscd/aicache.c:84 nscd/hstcache.c:483
+#: nscd/aicache.c:85 nscd/hstcache.c:494
#, c-format
msgid "Reloading \"%s\" in hosts cache!"
msgstr "Äang nạp lại « %s » trong bá»™ nhá»› tạm các máy phục vụ !"
@@ -3601,264 +3686,264 @@ msgstr "thêm mục nhập mới « %s » có kiểu %s cho %s nhớ tạm %s"
#: nscd/cache.c:152
msgid " (first)"
-msgstr " (thứ nhất)"
+msgstr " (đầu tiên)"
-#: nscd/cache.c:286 nscd/connections.c:866
+#: nscd/cache.c:276 nscd/connections.c:861
#, c-format
msgid "cannot stat() file `%s': %s"
msgstr "không thể stat() tập tin « %s »: %s"
-#: nscd/cache.c:328
+#: nscd/cache.c:318
#, c-format
msgid "pruning %s cache; time %ld"
msgstr "Ä‘ang xén bá»™ nhá»› tạm %s; thá»i gian %ld"
-#: nscd/cache.c:357
+#: nscd/cache.c:347
#, c-format
msgid "considering %s entry \"%s\", timeout %<PRIu64>"
msgstr "Ä‘ang suy xét mục nhập %s « %s », thá»i hạn %<PRIu64>"
-#: nscd/connections.c:570
+#: nscd/connections.c:565
#, c-format
msgid "invalid persistent database file \"%s\": %s"
msgstr "tập tin cÆ¡ sở dữ liệu bá»n bỉ không hợp lệ « %s »: %s"
-#: nscd/connections.c:578
+#: nscd/connections.c:573
msgid "uninitialized header"
msgstr "phần đầu chưa sơ khởi"
-#: nscd/connections.c:583
+#: nscd/connections.c:578
msgid "header size does not match"
msgstr "kích cỡ phần đầu không tương ứng"
-#: nscd/connections.c:593
+#: nscd/connections.c:588
msgid "file size does not match"
msgstr "kích cỡ tập tin không tương ứng"
-#: nscd/connections.c:610
+#: nscd/connections.c:605
msgid "verification failed"
msgstr "lỗi thẩm tra"
-#: nscd/connections.c:624
+#: nscd/connections.c:619
#, c-format
msgid "suggested size of table for database %s larger than the persistent database's table"
msgstr "kích cỡ bảng đã đệ nghị cho cÆ¡ sở dữ liệu %s vẫn lá»›n hÆ¡n bảng của cÆ¡ sở dữ liệu bá»n bỉ"
-#: nscd/connections.c:635 nscd/connections.c:720
+#: nscd/connections.c:630 nscd/connections.c:715
#, c-format
msgid "cannot create read-only descriptor for \"%s\"; no mmap"
msgstr "không thể tạo bá»™ mô tả chỉ-Ä‘á»c cho « %s »; không có mmap"
-#: nscd/connections.c:651
+#: nscd/connections.c:646
#, c-format
msgid "cannot access '%s'"
msgstr "không thể truy cập đến « %s »"
-#: nscd/connections.c:699
+#: nscd/connections.c:694
#, c-format
msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
msgstr "cÆ¡ sở dữ liệu cho %s bị há»ng hoặc được dùng đồng thá»i; bạn hãy tá»± gỡ bá» %s nếu cần, rồi khởi chạy lại"
-#: nscd/connections.c:706
+#: nscd/connections.c:701
#, c-format
msgid "cannot create %s; no persistent database used"
msgstr "không thể tạo %s; không có cÆ¡ sở dữ liệu bá»n bỉ được dùng"
-#: nscd/connections.c:709
+#: nscd/connections.c:704
#, c-format
msgid "cannot create %s; no sharing possible"
msgstr "không thể tạo %s; không thể dùng chung"
-#: nscd/connections.c:780
+#: nscd/connections.c:775
#, c-format
msgid "cannot write to database file %s: %s"
msgstr "không thể ghi vào tập tin cơ sở dữ liệu %s: %s"
-#: nscd/connections.c:819
+#: nscd/connections.c:814
#, c-format
msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
msgstr "không thể đặt ổ cắm sẽ đóng khi thực hiện: %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:902
+#: nscd/connections.c:897
#, c-format
msgid "cannot open socket: %s"
msgstr "không thể mở ổ cắm: %s"
-#: nscd/connections.c:922
+#: nscd/connections.c:917
#, c-format
msgid "cannot change socket to nonblocking mode: %s"
msgstr "không thể chuyển đổi ổ cắm sang chế độ không chặn: %s"
-#: nscd/connections.c:930
+#: nscd/connections.c:925
#, c-format
msgid "cannot set socket to close on exec: %s"
msgstr "không thể đặt ổ cắm sẽ đóng khi thực hiện: %s"
-#: nscd/connections.c:943
+#: nscd/connections.c:938
#, c-format
msgid "cannot enable socket to accept connections: %s"
msgstr "không thể hiệu lực ổ cắm chấp nhận kết nối: %s"
-#: nscd/connections.c:1043
+#: nscd/connections.c:1039
#, c-format
msgid "provide access to FD %d, for %s"
msgstr "cung cấp truy cập vào FD %d, cho %s"
-#: nscd/connections.c:1055
+#: nscd/connections.c:1051
#, c-format
msgid "cannot handle old request version %d; current version is %d"
msgstr "không thể quản lý phiên bản yêu cầu cÅ© %d; phiên bản hiện thá»i là %d"
-#: nscd/connections.c:1077
+#: nscd/connections.c:1073
#, c-format
msgid "request from %ld not handled due to missing permission"
msgstr "yêu cầu từ %ld không được xá»­ lý do quyá»n truy cập bị thiếu"
-#: nscd/connections.c:1082
+#: nscd/connections.c:1078
#, c-format
msgid "request from '%s' [%ld] not handled due to missing permission"
msgstr "yêu cầu từ « %s » [%ld] không được xá»­ lý do quyá»n truy cập bị thiếu"
-#: nscd/connections.c:1087
+#: nscd/connections.c:1083
msgid "request not handled due to missing permission"
msgstr "yêu cầu không được xá»­ lý do quyá»n truy cập bị thiếu"
-#: nscd/connections.c:1125 nscd/connections.c:1178
+#: nscd/connections.c:1121 nscd/connections.c:1174
#, c-format
msgid "cannot write result: %s"
msgstr "không thể ghi kết quả: %s"
-#: nscd/connections.c:1261
+#: nscd/connections.c:1257
#, c-format
msgid "error getting caller's id: %s"
msgstr "gặp lá»—i khi lấy mã số gá»i: %s"
-#: nscd/connections.c:1320
+#: nscd/connections.c:1316
#, c-format
msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "không thể mở « /proc/self/cmdline »: %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:1334
+#: nscd/connections.c:1330
#, c-format
msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "không thể Ä‘á»c « /proc/self/cmdline »: %s; Ä‘ang tắt chế Ä‘á»™ rất cẩn thận"
-#: nscd/connections.c:1374
+#: nscd/connections.c:1370
#, c-format
msgid "cannot change to old UID: %s; disabling paranoia mode"
msgstr "không thể chuyển đổi sang UID cũ: %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:1384
+#: nscd/connections.c:1380
#, c-format
msgid "cannot change to old GID: %s; disabling paranoia mode"
msgstr "không thể chuyển đổi sang GID cũ: %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:1397
+#: nscd/connections.c:1393
#, c-format
msgid "cannot change to old working directory: %s; disabling paranoia mode"
msgstr "không thể chuyển đổi sang thư mục hoạt động cũ : %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:1429
+#: nscd/connections.c:1439
#, c-format
msgid "re-exec failed: %s; disabling paranoia mode"
msgstr "lỗi thực hiện lại: %s; đang tắt chế độ rất cẩn thận"
-#: nscd/connections.c:1438
+#: nscd/connections.c:1448
#, c-format
msgid "cannot change current working directory to \"/\": %s"
msgstr "không thể chuyển đổi thÆ° mục hoạt Ä‘á»™ng hiện thá»i sang « / »: %s"
-#: nscd/connections.c:1644
+#: nscd/connections.c:1641
#, c-format
msgid "short read while reading request: %s"
msgstr "Ä‘á»c ngắn khi Ä‘á»c yêu cầu : %s"
-#: nscd/connections.c:1677
+#: nscd/connections.c:1674
#, c-format
msgid "key length in request too long: %d"
msgstr "chiá»u dài khoá quá dài trong yêu cầu : %d"
-#: nscd/connections.c:1690
+#: nscd/connections.c:1687
#, c-format
msgid "short read while reading request key: %s"
msgstr "Ä‘á»c ngắn khi Ä‘á»c khoá yêu cầu : %s"
-#: nscd/connections.c:1699
+#: nscd/connections.c:1696
#, c-format
msgid "handle_request: request received (Version = %d) from PID %ld"
msgstr "handle_request: (quản lý yêu cầu) nhận được yêu cầu (Phiên bản = %d) từ PID %ld"
-#: nscd/connections.c:1704
+#: nscd/connections.c:1701
#, c-format
msgid "handle_request: request received (Version = %d)"
msgstr "handle_request: (quản lý yêu cầu) nhận được yêu cầu (Phiên bản = %d)"
-#: nscd/connections.c:1903 nscd/connections.c:2101
+#: nscd/connections.c:1901 nscd/connections.c:2099
#, c-format
msgid "disabled inotify after read error %d"
msgstr "đã tắt inotify sau khi gặp lá»—i Ä‘á»c %d"
-#: nscd/connections.c:2230
+#: nscd/connections.c:2228
msgid "could not initialize conditional variable"
msgstr "không thể sÆ¡ khởi biến Ä‘iá»u kiện"
-#: nscd/connections.c:2238
+#: nscd/connections.c:2236
msgid "could not start clean-up thread; terminating"
msgstr "không thể bắt đầu nhánh làm sạch nên chấm dứt"
-#: nscd/connections.c:2252
+#: nscd/connections.c:2250
msgid "could not start any worker thread; terminating"
msgstr "không thể bắt đầu bất cứ nhánh làm việc nào nên chấm dứt"
-#: nscd/connections.c:2303 nscd/connections.c:2304 nscd/connections.c:2321
-#: nscd/connections.c:2330 nscd/connections.c:2348 nscd/connections.c:2359
-#: nscd/connections.c:2370
+#: nscd/connections.c:2301 nscd/connections.c:2302 nscd/connections.c:2319
+#: nscd/connections.c:2328 nscd/connections.c:2346 nscd/connections.c:2357
+#: nscd/connections.c:2368
#, c-format
msgid "Failed to run nscd as user '%s'"
msgstr "Lá»—i chạy nscd dÆ°á»›i ngÆ°á»i dùng « %s »"
-#: nscd/connections.c:2322
+#: nscd/connections.c:2320
#, c-format
msgid "initial getgrouplist failed"
msgstr "getgrouplist (lấy danh sách nhóm) đầu tiên bị lỗi"
-#: nscd/connections.c:2331
+#: nscd/connections.c:2329
#, c-format
msgid "getgrouplist failed"
msgstr "getgrouplist (lấy danh sách nhóm) bị lỗi"
-#: nscd/connections.c:2349
+#: nscd/connections.c:2347
#, c-format
msgid "setgroups failed"
msgstr "setgroups (đặt các nhóm) bị lỗi"
-#: nscd/grpcache.c:395 nscd/hstcache.c:430 nscd/initgrcache.c:416
-#: nscd/pwdcache.c:400 nscd/servicescache.c:343
+#: nscd/grpcache.c:383 nscd/hstcache.c:439 nscd/initgrcache.c:406
+#: nscd/pwdcache.c:378 nscd/servicescache.c:332
#, c-format
msgid "short write in %s: %s"
msgstr "ghi ngắn trong %s: %s"
-#: nscd/grpcache.c:438 nscd/initgrcache.c:78
+#: nscd/grpcache.c:428 nscd/initgrcache.c:78
#, c-format
msgid "Haven't found \"%s\" in group cache!"
msgstr "Không tìm thấy « %s » trong bộ nhớ tạm nhóm !"
-#: nscd/grpcache.c:440 nscd/initgrcache.c:80
+#: nscd/grpcache.c:430 nscd/initgrcache.c:80
#, c-format
msgid "Reloading \"%s\" in group cache!"
msgstr "Äang nạp lại « %s » trong bá»™ nhá»› tạm nhóm !"
-#: nscd/grpcache.c:517
+#: nscd/grpcache.c:509
#, c-format
msgid "Invalid numeric gid \"%s\"!"
msgstr "GID thuộc số không hợp lệ « %s » !"
-#: nscd/mem.c:457
+#: nscd/mem.c:431
#, c-format
msgid "freed %zu bytes in %s cache"
msgstr "đã giải phóng %zu byte trong bộ nhớ tạm %s"
-#: nscd/mem.c:594
+#: nscd/mem.c:574
#, c-format
msgid "no more memory for database '%s'"
msgstr "không có bộ nhớ còn lại cho cơ sở dữ liệu « %s »"
@@ -3907,7 +3992,7 @@ msgstr "Dùng bá»™ nhá»› tạm riêng cho má»—i ngÆ°á»i dùng"
msgid "Name Service Cache Daemon."
msgstr "Trình ná»n nhá»› tạm dịch vụ tên."
-#: nscd/nscd.c:147 nss/getent.c:876 nss/makedb.c:123
+#: nscd/nscd.c:147 nss/getent.c:952 nss/makedb.c:123
#, c-format
msgid "wrong number of arguments"
msgstr "số đối số không đúng"
@@ -3936,7 +4021,7 @@ msgstr "không thể chuyển đổi thÆ° mục hoạt Ä‘á»™ng hiện thá»i san
msgid "Could not create log file"
msgstr "Không thể tạo tập tin ghi lưu"
-#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:172
+#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:174
#, c-format
msgid "Only root is allowed to use this option!"
msgstr "Chỉ cho phép ngÆ°Æ¡i chủ (root) dùng tùy chá»n này !"
@@ -3946,7 +4031,7 @@ msgstr "Chỉ cho phép ngÆ°Æ¡i chủ (root) dùng tùy chá»n này !"
msgid "'%s' is not a known database"
msgstr "« %s » không phải là kiểu cơ sở dữ liệu đã biết"
-#: nscd/nscd.c:370 nscd/nscd_stat.c:191
+#: nscd/nscd.c:370 nscd/nscd_stat.c:193
#, c-format
msgid "write incomplete"
msgstr "chÆ°a ghi xong"
@@ -4011,35 +4096,35 @@ msgstr "không thể lấy thÆ° mục hoạt Ä‘á»™ng hiện thá»i: %s; Ä‘ang tá
msgid "maximum file size for %s database too small"
msgstr "kích cỡ tập tin tối đa quá nhỠcho cơ sở dữ liệu %s"
-#: nscd/nscd_stat.c:141
+#: nscd/nscd_stat.c:143
#, c-format
msgid "cannot write statistics: %s"
msgstr "không thể ghi thống kê: %s"
-#: nscd/nscd_stat.c:156
+#: nscd/nscd_stat.c:158
msgid "yes"
msgstr "có"
-#: nscd/nscd_stat.c:157
+#: nscd/nscd_stat.c:159
msgid "no"
msgstr "không"
-#: nscd/nscd_stat.c:168
+#: nscd/nscd_stat.c:170
#, c-format
msgid "Only root or %s is allowed to use this option!"
msgstr "Chỉ cho phép ngÆ°Æ¡i chủ (root) hoặc %s dùng tùy chá»n này !"
-#: nscd/nscd_stat.c:179
+#: nscd/nscd_stat.c:181
#, c-format
msgid "nscd not running!\n"
msgstr "nscd không đang chạy !\n"
-#: nscd/nscd_stat.c:203
+#: nscd/nscd_stat.c:205
#, c-format
msgid "cannot read statistics data"
msgstr "không thể Ä‘á»c dữ liệu thống kê"
-#: nscd/nscd_stat.c:206
+#: nscd/nscd_stat.c:208
#, c-format
msgid ""
"nscd configuration:\n"
@@ -4050,27 +4135,27 @@ msgstr ""
"\n"
"%15d cấp gỡ lỗi máy phục vụ\n"
-#: nscd/nscd_stat.c:230
+#: nscd/nscd_stat.c:232
#, c-format
msgid "%3ud %2uh %2um %2lus server runtime\n"
msgstr "%3ud %2uh %2um %2lus thá»i gian chạy trình phục vụ\n"
-#: nscd/nscd_stat.c:233
+#: nscd/nscd_stat.c:235
#, c-format
msgid " %2uh %2um %2lus server runtime\n"
msgstr " %2uh %2um %2lus thá»i gian chạy trình phục vụ\n"
-#: nscd/nscd_stat.c:235
+#: nscd/nscd_stat.c:237
#, c-format
msgid " %2um %2lus server runtime\n"
msgstr " %2um %2lus thá»i gian chạy trình phục vụ\n"
-#: nscd/nscd_stat.c:237
+#: nscd/nscd_stat.c:239
#, c-format
msgid " %2lus server runtime\n"
msgstr " %2lus thá»i gian chạy trình phục vụ\n"
-#: nscd/nscd_stat.c:239
+#: nscd/nscd_stat.c:241
#, c-format
msgid ""
"%15d current number of threads\n"
@@ -4078,14 +4163,16 @@ msgid ""
"%15lu number of times clients had to wait\n"
"%15s paranoia mode enabled\n"
"%15lu restart internal\n"
+"%15u reload count\n"
msgstr ""
-"%15d số mạch hiện thá»i\n"
-"%15d số mạch tối đa\n"
+"%15d số tuyến hiện thá»i\n"
+"%15d số tuyến tối đa\n"
"%15lu số lần trình khách phải đợi\n"
"%15s chế độ rất cẩn thận được hiệu lực\n"
"%15lu khởi chạy lại nội bộ\n"
+"%15u tải lại số lượng\n"
-#: nscd/nscd_stat.c:273
+#: nscd/nscd_stat.c:276
#, c-format
msgid ""
"\n"
@@ -4136,17 +4223,17 @@ msgstr ""
"%15<PRIuMAX> lỗi cấp phát bộ nhớ\n"
"%15s kiểm tra « /etc/%s » để tìm thay đổi\n"
-#: nscd/pwdcache.c:443
+#: nscd/pwdcache.c:423
#, c-format
msgid "Haven't found \"%s\" in password cache!"
msgstr "Không tìm thấy « %s » trong bộ nhớ tạm mật khẩu !"
-#: nscd/pwdcache.c:445
+#: nscd/pwdcache.c:425
#, c-format
msgid "Reloading \"%s\" in password cache!"
msgstr "Äang nạp lại « %s » trong bá»™ nhá»› tạm mật khẩu !"
-#: nscd/pwdcache.c:523
+#: nscd/pwdcache.c:506
#, c-format
msgid "Invalid numeric uid \"%s\"!"
msgstr "UID thuộc số không hợp lệ « %s » !"
@@ -4253,43 +4340,47 @@ msgstr ""
"%15u lần thăm dò CAV\n"
"%15u lần trượt CAV\n"
-#: nscd/servicescache.c:390
+#: nscd/servicescache.c:381
#, c-format
msgid "Haven't found \"%s\" in services cache!"
msgstr "Không tìm thấy « %s » trong bộ nhớ tạm dịch vụ !"
-#: nscd/servicescache.c:392
+#: nscd/servicescache.c:383
#, c-format
msgid "Reloading \"%s\" in services cache!"
msgstr "Äang nạp lại « %s » trong bá»™ nhá»› tạm dịch vụ !"
-#: nss/getent.c:52
+#: nss/getent.c:54
msgid "database [key ...]"
msgstr "cơ sở dữ liệu [khoá ...]"
-#: nss/getent.c:57
+#: nss/getent.c:59
msgid "Service configuration to be used"
msgstr "Cấu hình dịch vụ cần dùng"
-#: nss/getent.c:62
+#: nss/getent.c:60
+msgid "disable IDN encoding"
+msgstr "tắt mã hoá IDN"
+
+#: nss/getent.c:65
msgid "Get entries from administrative database."
msgstr "Lấy các mục nhập từ cơ sở dữ liệu quản trị."
-#: nss/getent.c:143 nss/getent.c:408
+#: nss/getent.c:149 nss/getent.c:479
#, c-format
msgid "Enumeration not supported on %s\n"
msgstr "Chức năng đếm không được hỗ trợ trên %s\n"
-#: nss/getent.c:794
+#: nss/getent.c:866
#, c-format
msgid "Unknown database name"
msgstr "Không rõ tên cơ sở dữ liệu"
-#: nss/getent.c:820
+#: nss/getent.c:896
msgid "Supported databases:\n"
msgstr "Các cơ sở dữ liệu được hỗ trợ :\n"
-#: nss/getent.c:886
+#: nss/getent.c:962
#, c-format
msgid "Unknown database: %s\n"
msgstr "Không rõ cơ sở dữ liệu : %s\n"
@@ -4353,17 +4444,17 @@ msgstr "gặp vấn Ä‘á» khi Ä‘á»c « %s »"
msgid "while reading database"
msgstr "trong khi Ä‘á»c cÆ¡ sở dữ liệu"
-#: posix/getconf.c:945
+#: posix/getconf.c:1036
#, c-format
msgid "Usage: %s [-v specification] variable_name [pathname]\n"
msgstr "Sá»­ dụng: %s [-v đặc_tả] tên_biến [Ä‘Æ°á»ng_dẫn]\n"
-#: posix/getconf.c:948
+#: posix/getconf.c:1039
#, c-format
msgid " %s -a [pathname]\n"
msgstr " %s -a [Ä‘Æ°á»ng_dẫn]\n"
-#: posix/getconf.c:1023
+#: posix/getconf.c:1115
#, c-format
msgid ""
"Usage: getconf [-v SPEC] VAR\n"
@@ -4382,142 +4473,146 @@ msgstr ""
"ÄÆ°a ra ÄẶC_TẢ thì xuất giá trị cho môi trÆ°á»ng biên dịch ÄẶC_TẢ.\n"
"\n"
-#: posix/getconf.c:1081
+#: posix/getconf.c:1173
#, c-format
msgid "unknown specification \"%s\""
msgstr "không rõ đặc tả « %s »"
-#: posix/getconf.c:1109
+#: posix/getconf.c:1225
#, c-format
msgid "Couldn't execute %s"
msgstr "Không thể thực hiện %s"
-#: posix/getconf.c:1149 posix/getconf.c:1165
+#: posix/getconf.c:1269 posix/getconf.c:1285
msgid "undefined"
msgstr "chưa xác định"
-#: posix/getconf.c:1187
+#: posix/getconf.c:1307
#, c-format
msgid "Unrecognized variable `%s'"
msgstr "Không nhận ra biến « %s »"
-#: posix/getopt.c:570 posix/getopt.c:586
+#: posix/getopt.c:594 posix/getopt.c:623
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: tùy chá»n « %s » vẫn mÆ¡ hồ\n"
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: tùy chá»n « %s » chÆ°a rõ ràng; khả năng là:"
-#: posix/getopt.c:619 posix/getopt.c:623
+#: posix/getopt.c:664 posix/getopt.c:668
#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
msgstr "%s: tùy chá»n « --%s » không cho phép đối số\n"
-#: posix/getopt.c:632 posix/getopt.c:637
+#: posix/getopt.c:677 posix/getopt.c:682
#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
msgstr "%s: tùy chá»n « %c%s » không cho phép đối số\n"
-#: posix/getopt.c:680 posix/getopt.c:699 posix/getopt.c:1002
-#: posix/getopt.c:1021
+#: posix/getopt.c:725 posix/getopt.c:744
#, c-format
-msgid "%s: option '%s' requires an argument\n"
-msgstr "%s: tùy chá»n « %s » cần thiết đối số\n"
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: tùy chá»n « --%s » yêu cầu má»™t đối số\n"
-#: posix/getopt.c:737 posix/getopt.c:740
+#: posix/getopt.c:782 posix/getopt.c:785
#, c-format
msgid "%s: unrecognized option '--%s'\n"
msgstr "%s: không nhận ra tùy chá»n « --%s »\n"
-#: posix/getopt.c:748 posix/getopt.c:751
+#: posix/getopt.c:793 posix/getopt.c:796
#, c-format
msgid "%s: unrecognized option '%c%s'\n"
msgstr "%s: không nhận ra tùy chá»n « %c%s »\n"
-#: posix/getopt.c:800 posix/getopt.c:803
+#: posix/getopt.c:845 posix/getopt.c:848
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n"
-#: posix/getopt.c:853 posix/getopt.c:870 posix/getopt.c:1073
-#: posix/getopt.c:1091
+#: posix/getopt.c:898 posix/getopt.c:915 posix/getopt.c:1123
+#: posix/getopt.c:1141
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: tùy chá»n cần thiết đối số -- « %c »\n"
-#: posix/getopt.c:923 posix/getopt.c:939
+#: posix/getopt.c:971 posix/getopt.c:987
#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
msgstr "%s: tùy chá»n « -W %s » vẫn mÆ¡ hồ\n"
-#: posix/getopt.c:963 posix/getopt.c:981
+#: posix/getopt.c:1011 posix/getopt.c:1029
#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr "%s: tùy chá»n « -W %s » không cho phép đối số\n"
-#: posix/regcomp.c:136
+#: posix/getopt.c:1050 posix/getopt.c:1068
+#, c-format
+msgid "%s: option '-W %s' requires an argument\n"
+msgstr "%s: tùy chá»n « -W %s » yêu cầu má»™t đối số\n"
+
+#: posix/regcomp.c:135
msgid "No match"
msgstr "Không khớp"
-#: posix/regcomp.c:139
+#: posix/regcomp.c:138
msgid "Invalid regular expression"
msgstr "Biểu thức chính quy không hợp lệ"
-#: posix/regcomp.c:142
+#: posix/regcomp.c:141
msgid "Invalid collation character"
msgstr "Ký tự đối chiếu không hợp lệ"
-#: posix/regcomp.c:145
+#: posix/regcomp.c:144
msgid "Invalid character class name"
msgstr "Tên loại ký tự không hợp lệ"
-#: posix/regcomp.c:148
+#: posix/regcomp.c:147
msgid "Trailing backslash"
msgstr "Có gạch chéo ngược theo sau"
-#: posix/regcomp.c:151
+#: posix/regcomp.c:150
msgid "Invalid back reference"
msgstr "Tham chiếu ngược không hợp lệ"
-#: posix/regcomp.c:154
+#: posix/regcomp.c:153
msgid "Unmatched [ or [^"
msgstr "Chưa khớp ký tự « [ » hay « [^ »"
-#: posix/regcomp.c:157
+#: posix/regcomp.c:156
msgid "Unmatched ( or \\("
msgstr "Chưa khớp ký tự « ( » hay « \\( »"
-#: posix/regcomp.c:160
+#: posix/regcomp.c:159
msgid "Unmatched \\{"
msgstr "Chưa khớp ký tự « \\{ »"
-#: posix/regcomp.c:163
+#: posix/regcomp.c:162
msgid "Invalid content of \\{\\}"
msgstr "Nội dụng « \\{\\} » không hợp lệ"
-#: posix/regcomp.c:166
+#: posix/regcomp.c:165
msgid "Invalid range end"
msgstr "Sai kết thúc phạm vi"
-#: posix/regcomp.c:169
+#: posix/regcomp.c:168
msgid "Memory exhausted"
msgstr "Cạn bộ nhớ"
-#: posix/regcomp.c:172
+#: posix/regcomp.c:171
msgid "Invalid preceding regular expression"
msgstr "Biểu thức chính quy đi trước không hợp lệ"
-#: posix/regcomp.c:175
+#: posix/regcomp.c:174
msgid "Premature end of regular expression"
msgstr "Biểu thức chính quy kết thúc quá sớm"
-#: posix/regcomp.c:178
+#: posix/regcomp.c:177
msgid "Regular expression too big"
msgstr "Biểu thức chính quy quá lớn"
-#: posix/regcomp.c:181
+#: posix/regcomp.c:180
msgid "Unmatched ) or \\)"
msgstr "Chưa khớp ký tự « ) » hay « \\) »"
-#: posix/regcomp.c:681
+#: posix/regcomp.c:680
msgid "No previous regular expression"
msgstr "Không có biểu thức chính quy đi trước"
@@ -4578,6 +4673,187 @@ msgstr "%s: dòng %d: câu lệnh sau « %s »\n"
msgid "%s: line %d: ignoring trailing garbage `%s'\n"
msgstr "%s: dòng %d: đang bỠqua rác đi theo « %s »\n"
+#: stdio-common/psiginfo-data.h:2
+msgid "Illegal opcode"
+msgstr "Opcode (mã thao tác) không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:3
+msgid "Illegal operand"
+msgstr "Toán hạng không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:4
+msgid "Illegal addressing mode"
+msgstr "Chế độ đánh địa chỉ không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:5
+msgid "Illegal trap"
+msgstr "Bẫy không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:6
+msgid "Privileged opcode"
+msgstr "Opcode (mã thao tác) đặc quyá»n"
+
+#: stdio-common/psiginfo-data.h:7
+msgid "Privileged register"
+msgstr "Thanh ghi đặc quyá»n"
+
+#: stdio-common/psiginfo-data.h:8
+msgid "Coprocessor error"
+msgstr "Lỗi bộ đồng xử lý"
+
+#: stdio-common/psiginfo-data.h:9
+msgid "Internal stack error"
+msgstr "Lỗi nội bộ tràn đống (stack)"
+
+#: stdio-common/psiginfo-data.h:12
+msgid "Integer divide by zero"
+msgstr "Phép chia cho không"
+
+#: stdio-common/psiginfo-data.h:13
+msgid "Integer overflow"
+msgstr "Tràn số nguyên"
+
+#: stdio-common/psiginfo-data.h:14
+msgid "Floating-point divide by zero"
+msgstr "Số thực dấu chấm động chia cho không"
+
+#: stdio-common/psiginfo-data.h:15
+msgid "Floating-point overflow"
+msgstr "tràn chấm động"
+
+#: stdio-common/psiginfo-data.h:16
+msgid "Floating-point underflow"
+msgstr "Số thực dấu chấm động tràn ngầm"
+
+#: stdio-common/psiginfo-data.h:17
+msgid "Floating-poing inexact result"
+msgstr "Số thực dấu chấm động: kết quả không chính xác"
+
+#: stdio-common/psiginfo-data.h:18
+msgid "Invalid floating-point operation"
+msgstr "toán tử với số thực dấu chấm động không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:19
+msgid "Subscript out of range"
+msgstr "Chỉ số dưới ở ngoài phạm vi"
+
+#: stdio-common/psiginfo-data.h:22
+msgid "Address not mapped to object"
+msgstr "Äịa chỉ không được ánh xạ đến đối tượng"
+
+#: stdio-common/psiginfo-data.h:23
+msgid "Invalid permissions for mapped object"
+msgstr "Quyá»n cho đối tượng đã ánh xạ không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:26
+msgid "Invalid address alignment"
+msgstr "Căn chỉnh địa chỉ không hợp lệ"
+
+#: stdio-common/psiginfo-data.h:27
+msgid "Nonexisting physical address"
+msgstr "Không tồn tại địa chỉ vật lý"
+
+#: stdio-common/psiginfo-data.h:28
+msgid "Object-specific hardware error"
+msgstr "Äặc tính đối tượng phần cứng bị lá»—i"
+
+#: stdio-common/psiginfo-data.h:31
+msgid "Process breakpoint"
+msgstr "Äiểm ngắt quá trình"
+
+#: stdio-common/psiginfo-data.h:32
+msgid "Process trace trap"
+msgstr "Bẫy quá trình (process) theo vết"
+
+#: stdio-common/psiginfo-data.h:35
+msgid "Child has exited"
+msgstr "Tiến trình con đã thoát"
+
+#: stdio-common/psiginfo-data.h:36
+msgid "Child has terminated abnormally and did not create a core file"
+msgstr "Tuyến trình con đã bị chấm dứt bất thÆ°á»ng và không tạo ra tệp tin lõi (core)"
+
+#: stdio-common/psiginfo-data.h:37
+msgid "Child hat terminated abnormally and created a core file"
+msgstr "Tuyến trình con đã bị chấm dứt bất thÆ°á»ng và tạo ra má»™t tệp tin lõi (core)"
+
+#: stdio-common/psiginfo-data.h:38
+msgid "Traced child has trapped"
+msgstr "Dấu vết tuyến trình con được bắt"
+
+#: stdio-common/psiginfo-data.h:39
+msgid "Child has stopped"
+msgstr "Tiến trình con đã dừng"
+
+#: stdio-common/psiginfo-data.h:40
+msgid "Stopped child has continued"
+msgstr "Tiến trình con bị dừng vẫn tiếp tục chạy"
+
+#: stdio-common/psiginfo-data.h:43
+msgid "Data input available"
+msgstr "Dữ liệu nhập sẵn dùng"
+
+#: stdio-common/psiginfo-data.h:44
+msgid "Output buffers available"
+msgstr "Bộ đệm xuất sẵn dùng"
+
+#: stdio-common/psiginfo-data.h:45
+msgid "Input message available"
+msgstr "Bộ đệm nhập sẵn dùng"
+
+#: stdio-common/psiginfo-data.h:46
+msgid "I/O error"
+msgstr "Lá»—i V/R"
+
+#: stdio-common/psiginfo-data.h:47
+msgid "High priority input available"
+msgstr "Mức ưu tiên nhập liệu cao đã sẵn sàng"
+
+#: stdio-common/psiginfo-data.h:48
+msgid "Device disconnected"
+msgstr "Thiết bị ngắt kết nối"
+
+#: stdio-common/psiginfo.c:145
+msgid "Signal sent by kill()"
+msgstr "Tín hiệu đã gửi bởi kill()"
+
+#: stdio-common/psiginfo.c:148
+msgid "Signal sent by sigqueue()"
+msgstr "Tín hiệu đã gửi bởi sigqueue()"
+
+#: stdio-common/psiginfo.c:151
+msgid "Signal generated by the expiration of a timer"
+msgstr "Tín hiệu được sinh ra khi đồng hồ (hẹn giá») hết"
+
+#: stdio-common/psiginfo.c:154
+msgid "Signal generated by the completion of an asynchronous I/O request"
+msgstr "Tín hiệu được sinh ra bởi yêu cầu V/R đồng bộ hoá được thực hiện xong"
+
+#: stdio-common/psiginfo.c:158
+msgid "Signal generated by the arrival of a message on an empty message queue"
+msgstr "Tín hiệu được sinh ra bởi thông điệp mới đến của hàng đợi thông điệp rỗng"
+
+#: stdio-common/psiginfo.c:163
+msgid "Signal sent by tkill()"
+msgstr "Tín hiệu đã gửi bởi tkill()"
+
+#: stdio-common/psiginfo.c:168
+msgid "Signal generated by the completion of an asynchronous name lookup request"
+msgstr "Tín hiệu được sinh ra bởi yêu cầu đồng bộ hoá tìm kiếm tên được thực hiện xong"
+
+#: stdio-common/psiginfo.c:174
+msgid "Signal generated by the completion of an I/O request"
+msgstr "Tín hiệu được sinh ra bởi yêu cầu V/R được thực hiện xong"
+
+#: stdio-common/psiginfo.c:180
+msgid "Signal sent by the kernel"
+msgstr "Tín hiệu được gửi bởi nhân"
+
+#: stdio-common/psiginfo.c:204
+#, c-format
+msgid "Unknown signal %d\n"
+msgstr "Tín hiệu không rõ %d\n"
+
#: stdio-common/psignal.c:51
#, c-format
msgid "%s%sUnknown signal %d\n"
@@ -4587,7 +4863,7 @@ msgstr "%s%sTín hiệu không rõ %d\n"
msgid "Unknown signal"
msgstr "Tín hiệu không rõ"
-#: string/_strerror.c:45 sysdeps/mach/_strerror.c:87
+#: string/_strerror.c:47 sysdeps/mach/_strerror.c:87
msgid "Unknown error "
msgstr "Lỗi không rõ "
@@ -4605,595 +4881,595 @@ msgstr "Tín hiệu thá»i gian thá»±c %d"
msgid "Unknown signal %d"
msgstr "Tín hiệu không rõ %d"
-#: sunrpc/auth_unix.c:114 sunrpc/clnt_tcp.c:131 sunrpc/clnt_udp.c:143
-#: sunrpc/clnt_unix.c:128 sunrpc/svc_tcp.c:179 sunrpc/svc_tcp.c:218
-#: sunrpc/svc_udp.c:153 sunrpc/svc_unix.c:176 sunrpc/svc_unix.c:215
-#: sunrpc/xdr.c:566 sunrpc/xdr.c:718 sunrpc/xdr_array.c:106
-#: sunrpc/xdr_rec.c:156 sunrpc/xdr_ref.c:85
+#: sunrpc/auth_unix.c:113 sunrpc/clnt_tcp.c:125 sunrpc/clnt_udp.c:136
+#: sunrpc/clnt_unix.c:126 sunrpc/svc_tcp.c:173 sunrpc/svc_tcp.c:218
+#: sunrpc/svc_udp.c:147 sunrpc/svc_unix.c:174 sunrpc/svc_unix.c:215
+#: sunrpc/xdr.c:632 sunrpc/xdr.c:792 sunrpc/xdr_array.c:100
+#: sunrpc/xdr_rec.c:154 sunrpc/xdr_ref.c:79
msgid "out of memory\n"
msgstr "không đủ bộ nhớ\n"
-#: sunrpc/auth_unix.c:350
+#: sunrpc/auth_unix.c:351
msgid "auth_unix.c: Fatal marshalling problem"
msgstr "auth_unix.c: lá»—i nghiêm trá»ng khi sắp đặt vào hàng ngÅ©"
-#: sunrpc/clnt_perr.c:105 sunrpc/clnt_perr.c:121
+#: sunrpc/clnt_perr.c:98 sunrpc/clnt_perr.c:114
#, c-format
msgid "%s: %s; low version = %lu, high version = %lu"
msgstr "%s:%s; phiên bản dưới = %lu, phiên bản trên = %lu"
-#: sunrpc/clnt_perr.c:112
+#: sunrpc/clnt_perr.c:105
#, c-format
msgid "%s: %s; why = %s\n"
msgstr "%s:%s; tại vì = %s\n"
-#: sunrpc/clnt_perr.c:114
+#: sunrpc/clnt_perr.c:107
#, c-format
msgid "%s: %s; why = (unknown authentication error - %d)\n"
msgstr "%s:%s; tại vì = (không rõ lỗi xác thực - %d)\n"
-#: sunrpc/clnt_perr.c:159
+#: sunrpc/clnt_perr.c:156
msgid "RPC: Success"
msgstr "RPC: Thành công"
-#: sunrpc/clnt_perr.c:162
+#: sunrpc/clnt_perr.c:159
msgid "RPC: Can't encode arguments"
msgstr "RPC: Không thể mã hoá đối số"
-#: sunrpc/clnt_perr.c:166
+#: sunrpc/clnt_perr.c:163
msgid "RPC: Can't decode result"
msgstr "RPC: Không thể giải mã kết quả"
-#: sunrpc/clnt_perr.c:170
+#: sunrpc/clnt_perr.c:167
msgid "RPC: Unable to send"
msgstr "RPC: Không thể gửi"
-#: sunrpc/clnt_perr.c:174
+#: sunrpc/clnt_perr.c:171
msgid "RPC: Unable to receive"
msgstr "RPC: Không thể nhận"
-#: sunrpc/clnt_perr.c:178
+#: sunrpc/clnt_perr.c:175
msgid "RPC: Timed out"
msgstr "RPC: Quá hạn"
-#: sunrpc/clnt_perr.c:182
+#: sunrpc/clnt_perr.c:179
msgid "RPC: Incompatible versions of RPC"
msgstr "RPC: Các phiên bản RPC không tương thích với nhau"
-#: sunrpc/clnt_perr.c:186
+#: sunrpc/clnt_perr.c:183
msgid "RPC: Authentication error"
msgstr "RPC: Lỗi xác thực"
-#: sunrpc/clnt_perr.c:190
+#: sunrpc/clnt_perr.c:187
msgid "RPC: Program unavailable"
msgstr "RPC: Chương trình không sẵn sàng"
-#: sunrpc/clnt_perr.c:194
+#: sunrpc/clnt_perr.c:191
msgid "RPC: Program/version mismatch"
msgstr "RPC: Sai khớp chương trình và phiên bản"
-#: sunrpc/clnt_perr.c:198
+#: sunrpc/clnt_perr.c:195
msgid "RPC: Procedure unavailable"
msgstr "RPC: Thủ tục không sẵn sàng"
-#: sunrpc/clnt_perr.c:202
+#: sunrpc/clnt_perr.c:199
msgid "RPC: Server can't decode arguments"
msgstr "RPC: Trình phục vụ không thể giải mã đối số"
-#: sunrpc/clnt_perr.c:206
+#: sunrpc/clnt_perr.c:203
msgid "RPC: Remote system error"
msgstr "RPC: Lỗi hệ thống ở xa"
-#: sunrpc/clnt_perr.c:210
+#: sunrpc/clnt_perr.c:207
msgid "RPC: Unknown host"
msgstr "RPC: Máy lạ"
-#: sunrpc/clnt_perr.c:214
+#: sunrpc/clnt_perr.c:211
msgid "RPC: Unknown protocol"
msgstr "RPC: Không rõ giao thức"
-#: sunrpc/clnt_perr.c:218
+#: sunrpc/clnt_perr.c:215
msgid "RPC: Port mapper failure"
msgstr "RPC: Lỗi ánh xạ cổng"
-#: sunrpc/clnt_perr.c:222
+#: sunrpc/clnt_perr.c:219
msgid "RPC: Program not registered"
msgstr "RPC: Chưa đăng ký chương trình"
-#: sunrpc/clnt_perr.c:226
+#: sunrpc/clnt_perr.c:223
msgid "RPC: Failed (unspecified error)"
msgstr "RPC: Lỗi chưa xác định"
-#: sunrpc/clnt_perr.c:267
+#: sunrpc/clnt_perr.c:264
msgid "RPC: (unknown error code)"
msgstr "RPC: (mã lỗi không rõ)"
-#: sunrpc/clnt_perr.c:330
+#: sunrpc/clnt_perr.c:336
msgid "Authentication OK"
msgstr "Xác thực được"
-#: sunrpc/clnt_perr.c:333
+#: sunrpc/clnt_perr.c:339
msgid "Invalid client credential"
msgstr "Thông tin xác thực trình khách không hợp lệ"
-#: sunrpc/clnt_perr.c:337
+#: sunrpc/clnt_perr.c:343
msgid "Server rejected credential"
msgstr "Trình phục vụ đã từ chối thông tin xác thực"
-#: sunrpc/clnt_perr.c:341
+#: sunrpc/clnt_perr.c:347
msgid "Invalid client verifier"
msgstr "Äồ thẩm tra trình khách không hợp lệ"
-#: sunrpc/clnt_perr.c:345
+#: sunrpc/clnt_perr.c:351
msgid "Server rejected verifier"
msgstr "Trình phục vụ đã từ chối đồ thẩm tra"
-#: sunrpc/clnt_perr.c:349
+#: sunrpc/clnt_perr.c:355
msgid "Client credential too weak"
msgstr "Thông tin xác thực của trình khách quá yếu"
-#: sunrpc/clnt_perr.c:353
+#: sunrpc/clnt_perr.c:359
msgid "Invalid server verifier"
msgstr "Äồ thẩm tra trình phục vụ không hợp lệ"
-#: sunrpc/clnt_perr.c:357
+#: sunrpc/clnt_perr.c:363
msgid "Failed (unspecified error)"
msgstr "Lỗi chưa xác định"
-#: sunrpc/clnt_raw.c:117
+#: sunrpc/clnt_raw.c:115
msgid "clnt_raw.c: fatal header serialization error"
msgstr "clnt_raw.c: lá»—i nghiêm trá»ng khi xếp theo thứ tá»±"
-#: sunrpc/pm_getmaps.c:83
+#: sunrpc/pm_getmaps.c:77
msgid "pmap_getmaps.c: rpc problem"
msgstr "pmap_getmaps.c: lá»—i RPC"
-#: sunrpc/pmap_clnt.c:129
+#: sunrpc/pmap_clnt.c:127
msgid "Cannot register service"
msgstr "Không thể đăng ký dịch vụ"
-#: sunrpc/pmap_rmt.c:248
+#: sunrpc/pmap_rmt.c:243
msgid "Cannot create socket for broadcast rpc"
msgstr "Không thể tạo ổ cắm cho RPC quảng bá"
-#: sunrpc/pmap_rmt.c:255
+#: sunrpc/pmap_rmt.c:250
msgid "Cannot set socket option SO_BROADCAST"
msgstr "Không thể đặt tùy chá»n ổ cắm SO_BROADCAST"
-#: sunrpc/pmap_rmt.c:307
+#: sunrpc/pmap_rmt.c:302
msgid "Cannot send broadcast packet"
msgstr "Không thể gửi gói tin quảng bá"
-#: sunrpc/pmap_rmt.c:332
+#: sunrpc/pmap_rmt.c:327
msgid "Broadcast poll problem"
msgstr "Vấn đỠthăm dò quảng bá"
-#: sunrpc/pmap_rmt.c:345
+#: sunrpc/pmap_rmt.c:340
msgid "Cannot receive reply to broadcast"
msgstr "Không thể nhận đáp ứng quảng bá"
-#: sunrpc/rpc_main.c:290
+#: sunrpc/rpc_main.c:288
#, c-format
msgid "%s: output would overwrite %s\n"
msgstr "%s: kết xuất sẽ ghi đè lên %s\n"
-#: sunrpc/rpc_main.c:297
+#: sunrpc/rpc_main.c:295
#, c-format
msgid "%s: unable to open %s: %m\n"
msgstr "%s: không thể mở %s: %m\n"
-#: sunrpc/rpc_main.c:309
+#: sunrpc/rpc_main.c:307
#, c-format
msgid "%s: while writing output %s: %m"
msgstr "%s: khi ghi kết xuất %s: %m"
-#: sunrpc/rpc_main.c:344
+#: sunrpc/rpc_main.c:342
#, c-format
msgid "cannot find C preprocessor: %s \n"
msgstr "không tìm thấy bá»™ tiá»n xá»­ lý C: %s\n"
-#: sunrpc/rpc_main.c:352
+#: sunrpc/rpc_main.c:350
msgid "cannot find any C preprocessor (cpp)\n"
msgstr "không tìm thấy bá»™ tiá»n xá»­ lý C (cpp)\n"
-#: sunrpc/rpc_main.c:421
+#: sunrpc/rpc_main.c:419
#, c-format
msgid "%s: C preprocessor failed with signal %d\n"
msgstr "%s: bá»™ tiá»n xá»­ lý C bị lá»—i vá»›i tín hiệu %d\n"
-#: sunrpc/rpc_main.c:424
+#: sunrpc/rpc_main.c:422
#, c-format
msgid "%s: C preprocessor failed with exit code %d\n"
msgstr "%s: bá»™ tiá»n xá»­ lý C bị lá»—i vá»›i mã thoát %d\n"
-#: sunrpc/rpc_main.c:464
+#: sunrpc/rpc_main.c:462
#, c-format
msgid "illegal nettype: `%s'\n"
msgstr "nettype cấm: « %s »\n"
-#: sunrpc/rpc_main.c:1130
+#: sunrpc/rpc_main.c:1128
#, c-format
msgid "rpcgen: too many defines\n"
msgstr "rpcgen: quá nhiá»u lần xác định\n"
-#: sunrpc/rpc_main.c:1142
+#: sunrpc/rpc_main.c:1140
#, c-format
msgid "rpcgen: arglist coding error\n"
msgstr "rpcgen: lỗi mã hoá danh sách đối số\n"
#. TRANS: the file will not be removed; this is an
#. TRANS: informative message.
-#: sunrpc/rpc_main.c:1175
+#: sunrpc/rpc_main.c:1173
#, c-format
msgid "file `%s' already exists and may be overwritten\n"
msgstr "tập tin « %s » đã có và có thể được ghi đè\n"
-#: sunrpc/rpc_main.c:1220
+#: sunrpc/rpc_main.c:1218
#, c-format
msgid "Cannot specify more than one input file!\n"
msgstr "Không thể ghi rõ nhiá»u hÆ¡n má»™t tập tin nhập vào !\n"
-#: sunrpc/rpc_main.c:1394
+#: sunrpc/rpc_main.c:1392
#, c-format
msgid "This implementation doesn't support newstyle or MT-safe code!\n"
msgstr "Bản thực hiện này không hỗ trợ mã kiểu mới hoặc mã an toàn với MT !\n"
-#: sunrpc/rpc_main.c:1403
+#: sunrpc/rpc_main.c:1401
#, c-format
msgid "Cannot use netid flag with inetd flag!\n"
msgstr "Không thể sư dụng cỠnetid với cỠinetd !\n"
-#: sunrpc/rpc_main.c:1415
+#: sunrpc/rpc_main.c:1413
#, c-format
msgid "Cannot use netid flag without TIRPC!\n"
msgstr "Không thể sư dụng cỠnetid khi không có TIRPC !\n"
-#: sunrpc/rpc_main.c:1422
+#: sunrpc/rpc_main.c:1420
#, c-format
msgid "Cannot use table flags with newstyle!\n"
msgstr "Không thể sử dụng cỠbảng với mã kiểu mới !\n"
-#: sunrpc/rpc_main.c:1441
+#: sunrpc/rpc_main.c:1439
#, c-format
msgid "\"infile\" is required for template generation flags.\n"
msgstr "« tập_tin_nhập » cần thiết cho cỠtạo mẫu.\n"
-#: sunrpc/rpc_main.c:1446
+#: sunrpc/rpc_main.c:1444
#, c-format
msgid "Cannot have more than one file generation flag!\n"
msgstr "Không cho phép nhiá»u hÆ¡n má»™t cá» tạo tập tin !\n"
-#: sunrpc/rpc_main.c:1455
+#: sunrpc/rpc_main.c:1453
#, c-format
msgid "usage: %s infile\n"
msgstr "sử dụng: %s tập_tin_nhập\n"
-#: sunrpc/rpc_main.c:1456
+#: sunrpc/rpc_main.c:1454
#, c-format
msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
msgstr "\t%s [-abkCLNTM][-Dname[=giá_trị]] [-i cỡ] [-I [-K giây]] [-Y Ä‘Æ°á»ng_dẫn] tập_tin_nhập\n"
-#: sunrpc/rpc_main.c:1458
+#: sunrpc/rpc_main.c:1456
#, c-format
msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o tập_tin_xuất] [tập_tin_nhập]\n"
-#: sunrpc/rpc_main.c:1460
+#: sunrpc/rpc_main.c:1458
#, c-format
msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
msgstr "\t%s [-s nettype]* [-o tập_tin_xuất] [tập_tin_nhập]\n"
-#: sunrpc/rpc_main.c:1461
+#: sunrpc/rpc_main.c:1459
#, c-format
msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
msgstr "\t%s [-n netid]* [-o tập_tin_xuất] [tập_tin_nhập]\n"
-#: sunrpc/rpc_main.c:1469
+#: sunrpc/rpc_main.c:1467
#, c-format
msgid "options:\n"
msgstr "tuỳ chá»n:\n"
-#: sunrpc/rpc_main.c:1470
+#: sunrpc/rpc_main.c:1468
#, c-format
msgid "-a\t\tgenerate all files, including samples\n"
msgstr "-a\t\ttạo ra tất cả các tập tin, gồm có mẫu\n"
-#: sunrpc/rpc_main.c:1471
+#: sunrpc/rpc_main.c:1469
#, c-format
msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
msgstr "-b\t\tchế Ä‘á»™ tÆ°Æ¡ng thích ngược (tạo ra mã cho hệ Ä‘iá»u hành SunOS 4.1)\n"
-#: sunrpc/rpc_main.c:1472
+#: sunrpc/rpc_main.c:1470
#, c-format
msgid "-c\t\tgenerate XDR routines\n"
msgstr "-c\t\ttạo ra các hàm XDR\n"
-#: sunrpc/rpc_main.c:1473
+#: sunrpc/rpc_main.c:1471
#, c-format
msgid "-C\t\tANSI C mode\n"
msgstr "-C\t\tchế độ ANSI C\n"
-#: sunrpc/rpc_main.c:1474
+#: sunrpc/rpc_main.c:1472
#, c-format
msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
msgstr "-Dtên[=giá_trị]\txác định một ký hiệu (giống « #define »)\n"
-#: sunrpc/rpc_main.c:1475
+#: sunrpc/rpc_main.c:1473
#, c-format
msgid "-h\t\tgenerate header file\n"
msgstr "-h\t\ttạo ra tập tin phần đầu\n"
-#: sunrpc/rpc_main.c:1476
+#: sunrpc/rpc_main.c:1474
#, c-format
msgid "-i size\t\tsize at which to start generating inline code\n"
msgstr "-i cỡ\t\tkích cỡ ở đó cần băt đầu tạo ra mã trực tiếp\n"
-#: sunrpc/rpc_main.c:1477
+#: sunrpc/rpc_main.c:1475
#, c-format
msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
msgstr "-l\t\ttạo ra mã cho há»— trợ inetd trong trình phục vụ (cho hệ Ä‘iá»u hành SunOS 4.1)\n"
-#: sunrpc/rpc_main.c:1478
+#: sunrpc/rpc_main.c:1476
#, c-format
msgid "-K seconds\tserver exits after K seconds of inactivity\n"
msgstr "-K giây\ttrình phục vụ thoát sau K giây nghỉ\n"
-#: sunrpc/rpc_main.c:1479
+#: sunrpc/rpc_main.c:1477
#, c-format
msgid "-l\t\tgenerate client side stubs\n"
msgstr "-l\t\ttạo ra mẩu bên ứng dụng khách\n"
-#: sunrpc/rpc_main.c:1480
+#: sunrpc/rpc_main.c:1478
#, c-format
msgid "-L\t\tserver errors will be printed to syslog\n"
msgstr "-L\t\tcác lỗi trình phục vụ sẽ được in ra bản ghi hệ thống syslog\n"
-#: sunrpc/rpc_main.c:1481
+#: sunrpc/rpc_main.c:1479
#, c-format
msgid "-m\t\tgenerate server side stubs\n"
msgstr "-m\t\ttạo ra mẩu bên trình phục vụ\n"
-#: sunrpc/rpc_main.c:1482
+#: sunrpc/rpc_main.c:1480
#, c-format
msgid "-M\t\tgenerate MT-safe code\n"
msgstr "-M\t\ttạo ra mã an toàn với MT\n"
-#: sunrpc/rpc_main.c:1483
+#: sunrpc/rpc_main.c:1481
#, c-format
msgid "-n netid\tgenerate server code that supports named netid\n"
msgstr "-n netid\ttạo ra mã trình phục vụ mà hỗ trợ netid đặt tên\n"
-#: sunrpc/rpc_main.c:1484
+#: sunrpc/rpc_main.c:1482
#, c-format
msgid "-N\t\tsupports multiple arguments and call-by-value\n"
msgstr "-N\t\thá»— trợ nhiá»u đối số và gá»i-theo-giá_trị\n"
-#: sunrpc/rpc_main.c:1485
+#: sunrpc/rpc_main.c:1483
#, c-format
msgid "-o outfile\tname of the output file\n"
msgstr "-o tập_tin_xuất\ttên của tập tin kết xuất\n"
-#: sunrpc/rpc_main.c:1486
+#: sunrpc/rpc_main.c:1484
#, c-format
msgid "-s nettype\tgenerate server code that supports named nettype\n"
msgstr "-s nettype\ttạo ra mã trình phục vụ mà hỗ trợ nettype đặt tên\n"
-#: sunrpc/rpc_main.c:1487
+#: sunrpc/rpc_main.c:1485
#, c-format
msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
msgstr "-Sc\t\ttạo ra mã ứng dụng khách mẫu mà sử dụng thủ tục từ xa\n"
-#: sunrpc/rpc_main.c:1488
+#: sunrpc/rpc_main.c:1486
#, c-format
msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
msgstr "-Ss\t\ttạo ra mã trình phục vụ mẫu mà xác định thủ tục từ xa\n"
-#: sunrpc/rpc_main.c:1489
+#: sunrpc/rpc_main.c:1487
#, c-format
msgid "-Sm \t\tgenerate makefile template \n"
msgstr "-Sm\t\ttạo ra mẫu makefile\n"
-#: sunrpc/rpc_main.c:1490
+#: sunrpc/rpc_main.c:1488
#, c-format
msgid "-t\t\tgenerate RPC dispatch table\n"
msgstr "-t\t\ttạo ra bảng Ä‘iá»u vận RPC\n"
-#: sunrpc/rpc_main.c:1491
+#: sunrpc/rpc_main.c:1489
#, c-format
msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
msgstr "-T\t\ttạo ra mã để há»— trợ bảng Ä‘iá»u vận RPC\n"
-#: sunrpc/rpc_main.c:1492
+#: sunrpc/rpc_main.c:1490
#, c-format
msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
msgstr "-Y Ä‘Æ°á»ng_dẫn\ttên thÆ° mục để tìm bá»™ tiá»n xá»­ lý C (cpp)\n"
-#: sunrpc/rpc_scan.c:114
+#: sunrpc/rpc_scan.c:112
msgid "constant or identifier expected"
msgstr "đợi bộ nhận diện hoặc hằng"
-#: sunrpc/rpc_scan.c:310
+#: sunrpc/rpc_scan.c:308
msgid "illegal character in file: "
msgstr "ký tự cấm trong tập tin:"
-#: sunrpc/rpc_scan.c:349 sunrpc/rpc_scan.c:375
+#: sunrpc/rpc_scan.c:347 sunrpc/rpc_scan.c:373
msgid "unterminated string constant"
msgstr "hằng chuỗi chưa chấm dứt"
-#: sunrpc/rpc_scan.c:381
+#: sunrpc/rpc_scan.c:379
msgid "empty char string"
msgstr "chuỗi ký tự trống"
-#: sunrpc/rpc_scan.c:523 sunrpc/rpc_scan.c:533
+#: sunrpc/rpc_scan.c:521 sunrpc/rpc_scan.c:531
msgid "preprocessor error"
msgstr "lá»—i tiá»n xá»­ lý"
-#: sunrpc/rpcinfo.c:254 sunrpc/rpcinfo.c:400
+#: sunrpc/rpcinfo.c:246 sunrpc/rpcinfo.c:392
#, c-format
msgid "program %lu is not available\n"
msgstr "chương trình %lu không sẵn sàng\n"
-#: sunrpc/rpcinfo.c:281 sunrpc/rpcinfo.c:327 sunrpc/rpcinfo.c:350
-#: sunrpc/rpcinfo.c:424 sunrpc/rpcinfo.c:470 sunrpc/rpcinfo.c:493
-#: sunrpc/rpcinfo.c:527
+#: 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 "chương trình %lu phiên bản %lu không sẵn sàng\n"
-#: sunrpc/rpcinfo.c:532
+#: sunrpc/rpcinfo.c:524
#, c-format
msgid "program %lu version %lu ready and waiting\n"
msgstr "chương trình %lu phiên bản %lu sẵn sàng và đợi\n"
-#: sunrpc/rpcinfo.c:573 sunrpc/rpcinfo.c:580
+#: sunrpc/rpcinfo.c:565 sunrpc/rpcinfo.c:572
msgid "rpcinfo: can't contact portmapper"
msgstr "rpcinfo: không thể liên lạc với portmapper"
-#: sunrpc/rpcinfo.c:587
+#: sunrpc/rpcinfo.c:579
msgid "No remote programs registered.\n"
msgstr "Không có chương trình ở xa đã đăng ký.\n"
-#: sunrpc/rpcinfo.c:591
+#: sunrpc/rpcinfo.c:583
msgid " program vers proto port\n"
msgstr " trình pbản gthức cổng\n"
-#: sunrpc/rpcinfo.c:630
+#: sunrpc/rpcinfo.c:622
msgid "(unknown)"
msgstr "(không rõ)"
-#: sunrpc/rpcinfo.c:654
+#: sunrpc/rpcinfo.c:646
#, c-format
msgid "rpcinfo: broadcast failed: %s\n"
msgstr "rpcinfo: lỗi quảng bá %s\n"
-#: sunrpc/rpcinfo.c:675
+#: sunrpc/rpcinfo.c:667
msgid "Sorry. You are not root\n"
msgstr "Tiếc là bạn không phải ngÆ°á»i chủ\n"
-#: sunrpc/rpcinfo.c:682
+#: sunrpc/rpcinfo.c:674
#, c-format
msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
msgstr "rpcinfo: Không thể xoá sự đăng ký đối với chương trình %s phiên bản %s\n"
-#: sunrpc/rpcinfo.c:691
+#: sunrpc/rpcinfo.c:683
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
msgstr "Sử dụng: rpcinfo [ -n số_cổng ] -u máy số_chương_trình [ số_phiên_bản ]\n"
-#: sunrpc/rpcinfo.c:693
+#: sunrpc/rpcinfo.c:685
msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
msgstr " rpcinfo [ -n số_cổng ] -t máy số_chương_trình [ số_phiên_bản ]\n"
-#: sunrpc/rpcinfo.c:695
+#: sunrpc/rpcinfo.c:687
msgid " rpcinfo -p [ host ]\n"
msgstr " rpcinfo -p [ máy ]\n"
-#: sunrpc/rpcinfo.c:696
+#: sunrpc/rpcinfo.c:688
msgid " rpcinfo -b prognum versnum\n"
msgstr " rpcinfo -b số_chương_trình số_phiên_bản\n"
-#: sunrpc/rpcinfo.c:697
+#: sunrpc/rpcinfo.c:689
msgid " rpcinfo -d prognum versnum\n"
msgstr " rpcinfo -d số_chương_trình số_phiên_bản\n"
-#: sunrpc/rpcinfo.c:722
+#: sunrpc/rpcinfo.c:714
#, c-format
msgid "rpcinfo: %s is unknown service\n"
msgstr "rpcinfo: %s là dịch vụ không rõ\n"
-#: sunrpc/rpcinfo.c:759
+#: sunrpc/rpcinfo.c:751
#, c-format
msgid "rpcinfo: %s is unknown host\n"
msgstr "rpcinfo: %s là máy không rõ\n"
-#: sunrpc/svc_run.c:70
+#: sunrpc/svc_run.c:71
msgid "svc_run: - out of memory"
msgstr "svc_run: tràn bộ nhớ"
-#: sunrpc/svc_run.c:90
+#: sunrpc/svc_run.c:91
msgid "svc_run: - poll failed"
msgstr "svc_run: lỗi thăm dò"
-#: sunrpc/svc_simple.c:87
+#: sunrpc/svc_simple.c:81
#, c-format
msgid "can't reassign procedure number %ld\n"
msgstr "không thể gán lại thủ tục số %ld\n"
-#: sunrpc/svc_simple.c:97
+#: sunrpc/svc_simple.c:91
msgid "couldn't create an rpc server\n"
msgstr "không thể tạo một trình phục vụ RPC\n"
-#: sunrpc/svc_simple.c:105
+#: sunrpc/svc_simple.c:99
#, c-format
msgid "couldn't register prog %ld vers %ld\n"
msgstr "không thể đăng ký chương trình %ld phiên bản %ld\n"
-#: sunrpc/svc_simple.c:113
+#: sunrpc/svc_simple.c:107
msgid "registerrpc: out of memory\n"
msgstr "registerrpc: tràn bộ nhớ\n"
-#: sunrpc/svc_simple.c:173
+#: sunrpc/svc_simple.c:168
#, c-format
msgid "trouble replying to prog %d\n"
msgstr "gặp khó đáp ứng chương trình %d\n"
-#: sunrpc/svc_simple.c:182
+#: sunrpc/svc_simple.c:177
#, c-format
msgid "never registered prog %d\n"
msgstr "chưa bao giỠđăng ký chương trình %d\n"
-#: sunrpc/svc_tcp.c:155
+#: sunrpc/svc_tcp.c:149
msgid "svc_tcp.c - tcp socket creation problem"
msgstr "svc_tcp.c — vấn đỠtạo ổ cắm TCP"
-#: sunrpc/svc_tcp.c:170
+#: sunrpc/svc_tcp.c:164
msgid "svc_tcp.c - cannot getsockname or listen"
msgstr "svc_tcp.c — không thể getsockname (lấy tên ổ cắm) hoặc lắng nghe"
-#: sunrpc/svc_udp.c:128
+#: sunrpc/svc_udp.c:122
msgid "svcudp_create: socket creation problem"
msgstr "svcudp_create: vấn đỠtạo ổ cắm"
-#: sunrpc/svc_udp.c:142
+#: sunrpc/svc_udp.c:136
msgid "svcudp_create - cannot getsockname"
msgstr "svcudp_create — không thể getsockname (lấy tên ổ cắm)"
-#: sunrpc/svc_udp.c:175
+#: sunrpc/svc_udp.c:168
msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
msgstr "svcudp_create: xp_pad quá nhỠcho IP_PKTINFO\n"
-#: sunrpc/svc_udp.c:475
+#: sunrpc/svc_udp.c:476
msgid "enablecache: cache already enabled"
msgstr "enablecache: bộ nhớ tạm đã được hiệu lực"
-#: sunrpc/svc_udp.c:481
+#: sunrpc/svc_udp.c:482
msgid "enablecache: could not allocate cache"
msgstr "enablecache: không thể cấp phát bộ nhớ tạm"
-#: sunrpc/svc_udp.c:490
+#: sunrpc/svc_udp.c:491
msgid "enablecache: could not allocate cache data"
msgstr "enablecache: không thể cấp phát dữ liệu của bộ nhớ tạm"
-#: sunrpc/svc_udp.c:498
+#: sunrpc/svc_udp.c:499
msgid "enablecache: could not allocate cache fifo"
msgstr "enablecache: không thể cấp phát FIFO (vào trước, ra trước) của bộ nhớ tạm"
-#: sunrpc/svc_udp.c:533
+#: sunrpc/svc_udp.c:535
msgid "cache_set: victim not found"
msgstr "cache_set: không tìm thấy victim"
-#: sunrpc/svc_udp.c:544
+#: sunrpc/svc_udp.c:546
msgid "cache_set: victim alloc failed"
msgstr "cache_set: lỗi cấp phát victim"
-#: sunrpc/svc_udp.c:551
+#: sunrpc/svc_udp.c:553
msgid "cache_set: could not allocate new rpc_buffer"
msgstr "cache_set: không thể cấp phát bộ đệm RPC (rpc_buffer) mới"
-#: sunrpc/svc_unix.c:150
+#: sunrpc/svc_unix.c:148
msgid "svc_unix.c - AF_UNIX socket creation problem"
msgstr "svc_unix.c — vấn đỠtạo ổ cắm AF_UNIX"
-#: sunrpc/svc_unix.c:166
+#: sunrpc/svc_unix.c:164
msgid "svc_unix.c - cannot getsockname or listen"
msgstr "svc_unix.c — không thể getsockname (lấy tên ổ cắm) hoặc lắng nghe"
@@ -6168,6 +6444,10 @@ msgstr "Chủ đã chết"
msgid "State not recoverable"
msgstr "Tình trạng không thể phục hồi được"
+#: sysdeps/gnu/errlist.c:1461
+msgid "Operation not possible due to RF-kill"
+msgstr "Thao tác không được bởi vì RF-kill"
+
#: sysdeps/mach/_strerror.c:57
msgid "Error in unknown error system: "
msgstr "Lỗi trong hệ thống lỗi không rõ : "
@@ -6277,42 +6557,48 @@ msgstr "không thể mở « %s »"
msgid "cannot read header from `%s'"
msgstr "không thể Ä‘á»c phần đầu từ « %s »"
-#: timezone/zdump.c:210
+#: timezone/zdump.c:215
msgid "lacks alphabetic at start"
msgstr "thiếu chữ cái ở đầu"
-#: timezone/zdump.c:212
+#: timezone/zdump.c:217
msgid "has fewer than 3 alphabetics"
msgstr "có ít hơn 3 chữ cái"
-#: timezone/zdump.c:214
+#: timezone/zdump.c:219
msgid "has more than 6 alphabetics"
msgstr "có nhiá»u hÆ¡n 6 chữ cái"
-#: timezone/zdump.c:222
+#: timezone/zdump.c:227
msgid "differs from POSIX standard"
msgstr "khác với tiêu chuẩn POSIX"
-#: timezone/zdump.c:228
+#: timezone/zdump.c:233
#, c-format
msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
msgstr "%s: cảnh báo : múi giỠ« %s » viết tắt « %s » %s\n"
-#: timezone/zdump.c:279
+#: timezone/zdump.c:242
#, c-format
-msgid "%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
-msgstr "%s: sử dụng: %s [ --version ] [ -v ] [ -c [năm_trên,]năm_dưới ] tên_múi_giỠ...\n"
+msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
+msgstr ""
+"%s: sử dụng %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] tên_múi_giỠ...\n"
+"\n"
+"Báo lỗi tới tz@elsie.nci.nih.gov.\n"
-#: timezone/zdump.c:296
+#: timezone/zdump.c:311
#, c-format
msgid "%s: wild -c argument %s\n"
msgstr "%s: đối số « -c » đại diện %s\n"
-#: timezone/zdump.c:387
+#: timezone/zdump.c:398
msgid "Error writing to standard output"
msgstr "Gặp lỗi khi ghi vào đầu ra tiêu chuẩn"
-#: timezone/zdump.c:410
+#: timezone/zdump.c:421
#, c-format
msgid "%s: use of -v on system with floating time_t other than float or double\n"
msgstr "%s: dùng « -v » trên hệ thống có time_t nổi khác với nổi hoặc đôi\n"
@@ -6339,341 +6625,357 @@ msgstr "cảnh báo : "
#: timezone/zic.c:459
#, c-format
msgid ""
-"%s: usage is %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
+"%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 ""
-"%s: sá»­ dụng: %s [ --version ] [ -v ] [ -l giá»_địa_phÆ°Æ¡ng ] [ -p quy_tắc_POSIX ] \\\n"
+"%s: sá»­ dụng: %s [ --version ] [ --help ] [ -v ] [ -l giá»_địa_phÆ°Æ¡ng ] [ -p quy_tắc_POSIX ] \\\n"
"\t[ -d thư_mục ] [ -L giây_năm_nhuận ] [ -y kiểu_năm ] [ tên_tập_tin ... ]\n"
+"\n"
+"Báo lỗi cho tz@elsie.nci.nih.gov.\n"
-#: timezone/zic.c:494
+#: timezone/zic.c:496
msgid "wild compilation-time specification of zic_t"
msgstr "đặc tả thá»i gian biên dịch đại diện của zic_t"
-#: timezone/zic.c:511
+#: timezone/zic.c:515
#, c-format
msgid "%s: More than one -d option specified\n"
msgstr "%s: Ghi rõ nhiá»u hÆ¡n má»™t tùy chá»n « -d »\n"
-#: timezone/zic.c:521
+#: timezone/zic.c:525
#, c-format
msgid "%s: More than one -l option specified\n"
msgstr "%s: Ghi rõ nhiá»u hÆ¡n má»™t tùy chá»n « -l »\n"
-#: timezone/zic.c:531
+#: timezone/zic.c:535
#, c-format
msgid "%s: More than one -p option specified\n"
msgstr "%s: Ghi rõ nhiá»u hÆ¡n má»™t tùy chá»n « -p »\n"
-#: timezone/zic.c:541
+#: timezone/zic.c:545
#, c-format
msgid "%s: More than one -y option specified\n"
msgstr "%s: Ghi rõ nhiá»u hÆ¡n má»™t tùy chá»n « -y »\n"
-#: timezone/zic.c:551
+#: timezone/zic.c:555
#, c-format
msgid "%s: More than one -L option specified\n"
msgstr "%s: Ghi rõ nhiá»u hÆ¡n má»™t tùy chá»n « -L »\n"
-#: timezone/zic.c:600
+#: timezone/zic.c:604
msgid "link to link"
msgstr "liên kết đến liên kết"
-#: timezone/zic.c:665
+#: timezone/zic.c:669
msgid "hard link failed, symbolic link used"
msgstr "lỗi cứng không thành công nên dùng liên kết tượng trưng"
-#: timezone/zic.c:673
+#: timezone/zic.c:677
#, c-format
msgid "%s: Can't link from %s to %s: %s\n"
msgstr "%s: không thể liên kết từ %s đến %s: %s\n"
-#: timezone/zic.c:745 timezone/zic.c:747
+#: timezone/zic.c:749 timezone/zic.c:751
msgid "same rule name in multiple files"
msgstr "nhiá»u tập tin chứa cùng má»™t tên quy tắc"
-#: timezone/zic.c:788
+#: timezone/zic.c:792
msgid "unruly zone"
msgstr "múi giỠphóng túng"
-#: timezone/zic.c:795
+#: timezone/zic.c:799
#, c-format
msgid "%s in ruleless zone"
msgstr "%s trong múi giỠkhông có quy tắc"
-#: timezone/zic.c:816
+#: timezone/zic.c:820
msgid "standard input"
msgstr "đầu vào tiêu chuẩn"
-#: timezone/zic.c:821
+#: timezone/zic.c:825
#, c-format
msgid "%s: Can't open %s: %s\n"
msgstr "%s: Không thể mở %s: %s\n"
-#: timezone/zic.c:832
+#: timezone/zic.c:836
msgid "line too long"
msgstr "dòng quá dài"
-#: timezone/zic.c:852
+#: timezone/zic.c:856
msgid "input line of unknown type"
msgstr "dòng nhập vào có kiểu không rõ"
-#: timezone/zic.c:868
+#: timezone/zic.c:872
#, c-format
msgid "%s: Leap line in non leap seconds file %s\n"
msgstr "%s: dòng năm nhuận nằm trong tập tin giây không phải năm nhuận %s\n"
-#: timezone/zic.c:875 timezone/zic.c:1312 timezone/zic.c:1334
+#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
msgstr "%s: không thể phục hồi: giá trị l_value không hợp lệ %d\n"
-#: timezone/zic.c:883
+#: timezone/zic.c:887
#, c-format
msgid "%s: Error reading %s\n"
msgstr "%s: Lá»—i Ä‘á»c %s\n"
-#: timezone/zic.c:890
+#: timezone/zic.c:894
#, c-format
msgid "%s: Error closing %s: %s\n"
msgstr "%s: Lỗi đóng %s: %s\n"
-#: timezone/zic.c:895
+#: timezone/zic.c:899
msgid "expected continuation line not found"
msgstr "không tìm thấy Ä‘Æ°á»ng tiếp tục mong đợi"
-#: timezone/zic.c:939 timezone/zic.c:2476 timezone/zic.c:2495
+#: timezone/zic.c:943 timezone/zic.c:2480 timezone/zic.c:2499
msgid "time overflow"
msgstr "tràn thá»i gian"
-#: timezone/zic.c:943
+#: timezone/zic.c:947
msgid "24:00 not handled by pre-1998 versions of zic"
msgstr "24:00 không được xử lý bởi phiên bản zlc trước năm 1998"
-#: timezone/zic.c:946
+#: timezone/zic.c:950
msgid "values over 24 hours not handled by pre-2007 versions of zic"
msgstr "giá trị nhiá»u hÆ¡n 24 giá» không được xá»­ lý bởi phiên bản zlc trÆ°á»›c năm 2007"
-#: timezone/zic.c:959
+#: timezone/zic.c:963
msgid "wrong number of fields on Rule line"
msgstr "số trÆ°á»ng không đúng trên dòng Quy tắc (Rule)"
-#: timezone/zic.c:963
+#: timezone/zic.c:967
msgid "nameless rule"
msgstr "quy tắc không tên"
-#: timezone/zic.c:968
+#: timezone/zic.c:972
msgid "invalid saved time"
msgstr "thá»i gian đã lÆ°u không hợp lệ"
-#: timezone/zic.c:989
+#: timezone/zic.c:993
msgid "wrong number of fields on Zone line"
msgstr "số trÆ°á»ng không đúng trên dòng Múi Giá» (Zone)"
-#: timezone/zic.c:995
+#: timezone/zic.c:999
#, c-format
msgid "\"Zone %s\" line and -l option are mutually exclusive"
msgstr "Dòng « Zone %s » và tùy chá»n « -l » loại từ lẫn nhau"
-#: timezone/zic.c:1003
+#: timezone/zic.c:1007
#, c-format
msgid "\"Zone %s\" line and -p option are mutually exclusive"
msgstr "Dòng « Zone %s » và tùy chá»n « -p » loại từ lẫn nhau"
-#: timezone/zic.c:1015
+#: timezone/zic.c:1019
#, c-format
msgid "duplicate zone name %s (file \"%s\", line %d)"
msgstr "tên múi giỠtrùng %s (tập tin « %s », dòng %d)"
-#: timezone/zic.c:1031
+#: timezone/zic.c:1035
msgid "wrong number of fields on Zone continuation line"
msgstr "số trÆ°á»ng không đúng trên dòng tiếp tục Múi Giá» (Zone)"
-#: timezone/zic.c:1071
+#: timezone/zic.c:1075
msgid "invalid UTC offset"
msgstr "khoảng bù UTC không hợp lệ"
-#: timezone/zic.c:1074
+#: timezone/zic.c:1078
msgid "invalid abbreviation format"
msgstr "định dạng viết tắt không hợp lệ"
-#: timezone/zic.c:1103
+#: timezone/zic.c:1107
msgid "Zone continuation line end time is not after end time of previous line"
msgstr "GiỠkết thúc dòng tiếp tục Múi GiỠkhông nằm sau giỠkết thúc của dòng trước"
-#: timezone/zic.c:1131
+#: timezone/zic.c:1135
msgid "wrong number of fields on Leap line"
msgstr "số trÆ°á»ng không đúng trên dòng Leap (năm nhuận)"
-#: timezone/zic.c:1140
+#: timezone/zic.c:1144
msgid "invalid leaping year"
msgstr "năm nhuận không hợp lệ"
-#: timezone/zic.c:1160 timezone/zic.c:1266
+#: timezone/zic.c:1164 timezone/zic.c:1270
msgid "invalid month name"
msgstr "tên tháng không hợp lệ"
-#: timezone/zic.c:1173 timezone/zic.c:1379 timezone/zic.c:1393
+#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
msgid "invalid day of month"
msgstr "ngày tháng không hợp lệ"
-#: timezone/zic.c:1178
+#: timezone/zic.c:1182
msgid "time before zero"
msgstr "thá»i gian nằm trÆ°á»›c số không"
-#: timezone/zic.c:1182
+#: timezone/zic.c:1186
msgid "time too small"
msgstr "thá»i gian quá nhá»"
-#: timezone/zic.c:1186
+#: timezone/zic.c:1190
msgid "time too large"
msgstr "thá»i gian quá lá»›n"
-#: timezone/zic.c:1190 timezone/zic.c:1295
+#: timezone/zic.c:1194 timezone/zic.c:1299
msgid "invalid time of day"
msgstr "giỠngày không hợp lệ"
-#: timezone/zic.c:1209
+#: timezone/zic.c:1213
msgid "illegal CORRECTION field on Leap line"
msgstr "trÆ°á»ng CORRECTION (sá»­a lá»—i) cấm trên dòng Leap (năm nhuận)"
-#: timezone/zic.c:1214
+#: timezone/zic.c:1218
msgid "illegal Rolling/Stationary field on Leap line"
msgstr "trÆ°á»ng Rolling/Stationary (Ä‘ang lăn/không di chuyển) cấm trên dòng Leap (năm nhuận)"
-#: timezone/zic.c:1230
+#: timezone/zic.c:1234
msgid "wrong number of fields on Link line"
msgstr "số trÆ°á»ng không đúng trên dòng Link (liên kết)"
-#: timezone/zic.c:1234
+#: timezone/zic.c:1238
msgid "blank FROM field on Link line"
msgstr "trÆ°á»ng FROM (từ) rá»—ng trên dòng Link (liên kết)"
-#: timezone/zic.c:1238
+#: timezone/zic.c:1242
msgid "blank TO field on Link line"
msgstr "trÆ°á»ng TO (đến) rá»—ng trên dòng Link (liên kết)"
-#: timezone/zic.c:1316
+#: timezone/zic.c:1320
msgid "invalid starting year"
msgstr "năm bắt đầu không hợp lệ"
-#: timezone/zic.c:1338
+#: timezone/zic.c:1342
msgid "invalid ending year"
msgstr "năm kết thúc không hợp lệ"
-#: timezone/zic.c:1342
+#: timezone/zic.c:1346
msgid "starting year greater than ending year"
msgstr "năm bắt đầu nằm sau nằm kết thúc"
-#: timezone/zic.c:1349
+#: timezone/zic.c:1353
msgid "typed single year"
msgstr "đã gõ năm riêng lẻ"
-#: timezone/zic.c:1384
+#: timezone/zic.c:1388
msgid "invalid weekday name"
msgstr "tên ngày tuần không hợp lệ"
-#: timezone/zic.c:1562
+#: timezone/zic.c:1566
#, c-format
msgid "%s: Can't remove %s: %s\n"
msgstr "%s: Không thể gỡ bỠ%s: %s\n"
-#: timezone/zic.c:1572
+#: timezone/zic.c:1576
#, c-format
msgid "%s: Can't create %s: %s\n"
msgstr "%s: Không thể tạo %s: %s\n"
-#: timezone/zic.c:1722
+#: timezone/zic.c:1726
#, c-format
msgid "%s: Error writing %s\n"
msgstr "%s: Lá»—i ghi %s\n"
-#: timezone/zic.c:2015
+#: timezone/zic.c:2019
msgid "no POSIX environment variable for zone"
msgstr "chÆ°a đặt biến môi trÆ°á»ng POSIX cho múi giá»"
-#: timezone/zic.c:2172
+#: timezone/zic.c:2176
msgid "can't determine time zone abbreviation to use just after until time"
msgstr "không thể quyết định từ viết tắt múi giá» cần dùng đúng sau thá»i gian đích đến"
-#: timezone/zic.c:2218
+#: timezone/zic.c:2222
msgid "too many transitions?!"
msgstr "quá nhiá»u lần chuyển tiếp ?!"
-#: timezone/zic.c:2237
+#: timezone/zic.c:2241
msgid "internal error - addtype called with bad isdst"
msgstr "gặp lá»—i ná»™i bá»™ — addtype (thêm loại) được gá»i vá»›i isdst sai"
-#: timezone/zic.c:2241
+#: timezone/zic.c:2245
msgid "internal error - addtype called with bad ttisstd"
msgstr "gặp lá»—i ná»™i bá»™ — addtype (thêm loại) được gá»i vá»›i ttisstd sai"
-#: timezone/zic.c:2245
+#: timezone/zic.c:2249
msgid "internal error - addtype called with bad ttisgmt"
msgstr "gặp lá»—i ná»™i bá»™ — addtype (thêm loại) được gá»i vá»›i ttisgmt sai"
-#: timezone/zic.c:2264
+#: timezone/zic.c:2268
msgid "too many local time types"
msgstr "quá nhiá»u kiểu thá»i gian địa phÆ°Æ¡ng"
-#: timezone/zic.c:2268
+#: timezone/zic.c:2272
msgid "UTC offset out of range"
msgstr "khoảng bù UTC ở ngoại phạm vi"
-#: timezone/zic.c:2296
+#: timezone/zic.c:2300
msgid "too many leap seconds"
msgstr "quá nhiá»u giây năm nhuận"
-#: timezone/zic.c:2302
+#: timezone/zic.c:2306
msgid "repeated leap second moment"
msgstr "lúc giây năm nhuận đã lặp lại"
-#: timezone/zic.c:2354
+#: timezone/zic.c:2358
msgid "Wild result from command execution"
msgstr "Kết quả rất lạ khi thực hiện câu lệnh"
-#: timezone/zic.c:2355
+#: timezone/zic.c:2359
#, c-format
msgid "%s: command was '%s', result was %d\n"
msgstr "%s: câu lệnh là « %s », kết quả là %d\n"
-#: timezone/zic.c:2453
+#: timezone/zic.c:2457
msgid "Odd number of quotation marks"
msgstr "Số lẻ các dấu trích dẫn"
-#: timezone/zic.c:2542
+#: timezone/zic.c:2546
msgid "use of 2/29 in non leap-year"
msgstr "dùng 2/29 trong năm không phải năm nhuận"
-#: timezone/zic.c:2577
+#: timezone/zic.c:2581
msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
msgstr "quy tắc vượt quá kết thúc của tháng nên không hoạt động được với phiên bản zlc được phát hành trước năm 2004"
-#: timezone/zic.c:2609
+#: timezone/zic.c:2613
msgid "time zone abbreviation lacks alphabetic at start"
msgstr "từ viết tắt múi giỠthiếu chữ cái ở đầu"
-#: timezone/zic.c:2611
+#: timezone/zic.c:2615
msgid "time zone abbreviation has more than 3 alphabetics"
msgstr "từ viết tắt múi giá» chứa nhiá»u hÆ¡n 3 chữ cái"
-#: timezone/zic.c:2613
+#: timezone/zic.c:2617
msgid "time zone abbreviation has too many alphabetics"
msgstr "từ viết tắt múi giá» chứa quá nhiá»u chữ cái"
-#: timezone/zic.c:2623
+#: timezone/zic.c:2627
msgid "time zone abbreviation differs from POSIX standard"
msgstr "từ viết tắt múi giỠkhông tùy theo tiêu chuẩn POSIX"
-#: timezone/zic.c:2635
+#: timezone/zic.c:2639
msgid "too many, or too long, time zone abbreviations"
msgstr "quá nhiá»u hoặc quá dài các từ viết tắt múi giá»"
-#: timezone/zic.c:2676
+#: timezone/zic.c:2680
#, c-format
msgid "%s: Can't create directory %s: %s\n"
msgstr "%s: Không thể tạo thư mục %s: %s\n"
-#: timezone/zic.c:2698
+#: timezone/zic.c:2702
#, c-format
msgid "%s: %d did not sign extend correctly\n"
msgstr "%s: %d chưa ký đúng đồ kéo dài\n"
+
+#~ msgid "Try \\`xtrace --help' for more information.\\n"
+#~ msgstr "Hãy thử lệnh trợ giúp « xtrace --help » để xem thông tin thêm.\\n"
+
+#~ msgid "xtrace: option \\`$1' requires an argument.\\n"
+#~ msgstr "xtrace: tùy chá»n « $1 » cần thiết đối số.\\n"
+
+#~ msgid "Try \\`memusage --help' for more information."
+#~ msgstr "Hãy thử lệnh trợ giúp « memusage --help » để xem thông tin thêm."
+
+#~ msgid "memusage: option \\`$1' requires an argument"
+#~ msgstr "memusage: tùy chá»n « $1 » cần thiết đối số"
diff --git a/libc/resolv/nss_dns/dns-host.c b/libc/resolv/nss_dns/dns-host.c
index 10aecb860..a924d4084 100644
--- a/libc/resolv/nss_dns/dns-host.c
+++ b/libc/resolv/nss_dns/dns-host.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004, 2007-2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -744,6 +744,10 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME)
{
+ /* A CNAME could also have a TTL entry. */
+ if (ttlp != NULL && ttl < *ttlp)
+ *ttlp = ttl;
+
if (ap >= &host_data->aliases[MAX_NR_ALIASES - 1])
continue;
n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
@@ -905,7 +909,10 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
{
register int nn;
- if (ttlp != NULL)
+ /* We compose a single hostent out of the entire chain of
+ entries, so the TTL of the hostent is essentially the lowest
+ TTL in the chain. */
+ if (ttlp != NULL && ttl < *ttlp)
*ttlp = ttl;
if (canonp != NULL)
*canonp = bp;
@@ -1081,6 +1088,11 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
if (type == T_CNAME)
{
char tbuf[MAXDNAME];
+
+ /* A CNAME could also have a TTL entry. */
+ if (ttlp != NULL && ttl < *ttlp)
+ *ttlp = ttl;
+
n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
if (__builtin_expect (n < 0 || res_hnok (tbuf) == 0, 0))
{
@@ -1161,7 +1173,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
if (*firstp)
{
- if (ttlp != NULL)
+ /* We compose a single hostent out of the entire chain of
+ entries, so the TTL of the hostent is essentially the lowest
+ TTL in the chain. */
+ if (ttlp != NULL && ttl < *ttlp)
*ttlp = ttl;
(*pat)->name = canon ?: h_name;
diff --git a/libc/resolv/res_send.c b/libc/resolv/res_send.c
index a001c1e75..0a28cd784 100644
--- a/libc/resolv/res_send.c
+++ b/libc/resolv/res_send.c
@@ -1013,8 +1013,9 @@ send_dg(res_state statp,
seconds /= statp->nscount;
if (seconds <= 0)
seconds = 1;
- bool single_request = (statp->options & RES_SNGLKUP) != 0;
bool single_request_reopen = (statp->options & RES_SNGLKUPREOP) != 0;
+ bool single_request = (((statp->options & RES_SNGLKUP) != 0)
+ | single_request_reopen);
int save_gotsomewhere = *gotsomewhere;
int retval;
@@ -1100,24 +1101,91 @@ send_dg(res_state statp,
}
__set_errno (0);
if (pfd[0].revents & POLLOUT) {
- ssize_t sr;
- if (nwritten != 0)
- sr = send (pfd[0].fd, buf2, buflen2, MSG_NOSIGNAL);
- else
- sr = send (pfd[0].fd, buf, buflen, MSG_NOSIGNAL);
+#ifndef __ASSUME_SENDMMSG
+ static int have_sendmmsg;
+#else
+# define have_sendmmsg 1
+#endif
+ if (have_sendmmsg >= 0 && nwritten == 0 && buf2 != NULL
+ && !single_request)
+ {
+ struct iovec iov[2];
+ struct mmsghdr reqs[2];
+ reqs[0].msg_hdr.msg_name = NULL;
+ reqs[0].msg_hdr.msg_namelen = 0;
+ reqs[0].msg_hdr.msg_iov = &iov[0];
+ reqs[0].msg_hdr.msg_iovlen = 1;
+ iov[0].iov_base = (void *) buf;
+ iov[0].iov_len = buflen;
+ reqs[0].msg_hdr.msg_control = NULL;
+ reqs[0].msg_hdr.msg_controllen = 0;
+
+ reqs[1].msg_hdr.msg_name = NULL;
+ reqs[1].msg_hdr.msg_namelen = 0;
+ reqs[1].msg_hdr.msg_iov = &iov[1];
+ reqs[1].msg_hdr.msg_iovlen = 1;
+ iov[1].iov_base = (void *) buf2;
+ iov[1].iov_len = buflen2;
+ reqs[1].msg_hdr.msg_control = NULL;
+ reqs[1].msg_hdr.msg_controllen = 0;
+
+ int ndg = sendmmsg (pfd[0].fd, reqs, 2, MSG_NOSIGNAL);
+ if (__builtin_expect (ndg == 2, 1))
+ {
+ if (reqs[0].msg_len != buflen
+ || reqs[1].msg_len != buflen2)
+ goto fail_sendmmsg;
- if (sr != buflen) {
- if (errno == EINTR || errno == EAGAIN)
- goto recompute_resend;
- Perror(statp, stderr, "send", errno);
+ pfd[0].events = POLLIN;
+ nwritten += 2;
+ }
+ else if (ndg == 1 && reqs[0].msg_len == buflen)
+ goto just_one;
+ else if (ndg < 0 && (errno == EINTR || errno == EAGAIN))
+ goto recompute_resend;
+ else
+ {
+#ifndef __ASSUME_SENDMMSG
+ if (__builtin_expect (have_sendmmsg == 0, 0))
+ {
+ if (ndg < 0 && errno == ENOSYS)
+ {
+ have_sendmmsg = -1;
+ goto try_send;
+ }
+ have_sendmmsg = 1;
+ }
+#endif
+
+ fail_sendmmsg:
+ Perror(statp, stderr, "sendmmsg", errno);
goto err_out;
- }
- if (nwritten != 0 || buf2 == NULL
- || single_request || single_request_reopen)
- pfd[0].events = POLLIN;
+ }
+ }
else
- pfd[0].events = POLLIN | POLLOUT;
- ++nwritten;
+ {
+ ssize_t sr;
+#ifndef __ASSUME_SENDMMSG
+ try_send:
+#endif
+ if (nwritten != 0)
+ sr = send (pfd[0].fd, buf2, buflen2, MSG_NOSIGNAL);
+ else
+ sr = send (pfd[0].fd, buf, buflen, MSG_NOSIGNAL);
+
+ if (sr != (nwritten != 0 ? buflen2 : buflen)) {
+ if (errno == EINTR || errno == EAGAIN)
+ goto recompute_resend;
+ Perror(statp, stderr, "send", errno);
+ goto err_out;
+ }
+ just_one:
+ if (nwritten != 0 || buf2 == NULL || single_request)
+ pfd[0].events = POLLIN;
+ else
+ pfd[0].events = POLLIN | POLLOUT;
+ ++nwritten;
+ }
goto wait;
} else if (pfd[0].revents & POLLIN) {
int *thisanssizp;
@@ -1327,7 +1395,7 @@ send_dg(res_state statp,
recvresp2 = 1;
/* Repeat waiting if we have a second answer to arrive. */
if ((recvresp1 & recvresp2) == 0) {
- if (single_request || single_request_reopen) {
+ if (single_request) {
pfd[0].events = POLLOUT;
if (single_request_reopen) {
__res_iclose (statp, false);
diff --git a/libc/scripts/check-local-headers.sh b/libc/scripts/check-local-headers.sh
index c7bc40bbc..08ed880c5 100755
--- a/libc/scripts/check-local-headers.sh
+++ b/libc/scripts/check-local-headers.sh
@@ -28,7 +28,7 @@ exec ${AWK} -v includedir="$includedir" '
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{
diff --git a/libc/stdio-common/bug22.c b/libc/stdio-common/bug22.c
index 2228388b4..efd950136 100644
--- a/libc/stdio-common/bug22.c
+++ b/libc/stdio-common/bug22.c
@@ -1,12 +1,22 @@
/* BZ #5424 */
#include <stdio.h>
+#include <errno.h>
+/* INT_MAX + 1 */
#define N 2147483648
+/* (INT_MAX / 2) + 2 */
+#define N2 1073741825
+
+/* INT_MAX - 3 */
+#define N3 2147483644
+
#define STRINGIFY(S) #S
#define MAKE_STR(S) STRINGIFY(S)
#define SN MAKE_STR(N)
+#define SN2 MAKE_STR(N2)
+#define SN3 MAKE_STR(N3)
static int
do_test (void)
@@ -20,11 +30,25 @@ do_test (void)
return 1;
}
- ret = fprintf (fp, "%" SN "d%" SN "d", 1, 1);
+ ret = fprintf (fp, "%" SN "d", 1);
+ printf ("ret = %d\n", ret);
+ if (ret != -1 || errno != EOVERFLOW)
+ return 1;
+
+ ret = fprintf (fp, "%." SN "d", 1);
+ printf ("ret = %d\n", ret);
+ if (ret != -1 || errno != EOVERFLOW)
+ return 1;
+
+ ret = fprintf (fp, "%." SN3 "d", 1);
+ printf ("ret = %d\n", ret);
+ if (ret != -1 || errno != EOVERFLOW)
+ return 1;
+ ret = fprintf (fp, "%" SN2 "d%" SN2 "d", 1, 1);
printf ("ret = %d\n", ret);
- return ret != -1;
+ return ret != -1 || errno != EOVERFLOW;
}
#define TIMEOUT 30
diff --git a/libc/stdio-common/printf-parse.h b/libc/stdio-common/printf-parse.h
index 72665dcec..3aa027424 100644
--- a/libc/stdio-common/printf-parse.h
+++ b/libc/stdio-common/printf-parse.h
@@ -68,16 +68,27 @@ union printf_arg
#ifndef DONT_NEED_READ_INT
/* Read a simple integer from a string and update the string pointer.
It is assumed that the first character is a digit. */
-static unsigned int
+static int
read_int (const UCHAR_T * *pstr)
{
- unsigned int retval = **pstr - L_('0');
+ int retval = **pstr - L_('0');
while (ISDIGIT (*++(*pstr)))
- {
- retval *= 10;
- retval += **pstr - L_('0');
- }
+ if (retval >= 0)
+ {
+ if (INT_MAX / 10 < retval)
+ retval = -1;
+ else
+ {
+ int digit = **pstr - L_('0');
+
+ retval *= 10;
+ if (INT_MAX - digit < retval)
+ retval = -1;
+ else
+ retval += digit;
+ }
+ }
return retval;
}
diff --git a/libc/stdio-common/printf-parsemb.c b/libc/stdio-common/printf-parsemb.c
index 2bdb5e65a..a45ac74e0 100644
--- a/libc/stdio-common/printf-parsemb.c
+++ b/libc/stdio-common/printf-parsemb.c
@@ -87,12 +87,15 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
n = read_int (&format);
- if (n > 0 && *format == L_('$'))
+ if (n != 0 && *format == L_('$'))
/* Is positional parameter. */
{
++format; /* Skip the '$'. */
- spec->data_arg = n - 1;
- *max_ref_arg = MAX (*max_ref_arg, n);
+ if (n != -1)
+ {
+ spec->data_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ }
}
else
/* Oops; that was actually the width and/or 0 padding flag.
@@ -160,10 +163,13 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
/* The width argument might be found in a positional parameter. */
n = read_int (&format);
- if (n > 0 && *format == L_('$'))
+ if (n != 0 && *format == L_('$'))
{
- spec->width_arg = n - 1;
- *max_ref_arg = MAX (*max_ref_arg, n);
+ if (n != -1)
+ {
+ spec->width_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ }
++format; /* Skip '$'. */
}
}
@@ -177,9 +183,13 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
}
}
else if (ISDIGIT (*format))
- /* Constant width specification. */
- spec->info.width = read_int (&format);
+ {
+ int n = read_int (&format);
+ /* Constant width specification. */
+ if (n != -1)
+ spec->info.width = n;
+ }
/* Get the precision. */
spec->prec_arg = -1;
/* -1 means none given; 0 means explicit 0. */
@@ -196,10 +206,13 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
{
n = read_int (&format);
- if (n > 0 && *format == L_('$'))
+ if (n != 0 && *format == L_('$'))
{
- spec->prec_arg = n - 1;
- *max_ref_arg = MAX (*max_ref_arg, n);
+ if (n != -1)
+ {
+ spec->prec_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ }
++format;
}
}
@@ -213,7 +226,12 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
}
}
else if (ISDIGIT (*format))
- spec->info.prec = read_int (&format);
+ {
+ int n = read_int (&format);
+
+ if (n != -1)
+ spec->info.prec = n;
+ }
else
/* "%.?" is treated like "%.0?". */
spec->info.prec = 0;
diff --git a/libc/stdio-common/vfprintf.c b/libc/stdio-common/vfprintf.c
index dcbae68c4..609bcf994 100644
--- a/libc/stdio-common/vfprintf.c
+++ b/libc/stdio-common/vfprintf.c
@@ -68,10 +68,10 @@
do { \
unsigned int _val = val; \
assert ((unsigned int) done < (unsigned int) INT_MAX); \
- if (__builtin_expect ((unsigned int) INT_MAX - (unsigned int) done \
- < _val, 0)) \
+ if (__builtin_expect (INT_MAX - done < _val, 0)) \
{ \
done = -1; \
+ __set_errno (EOVERFLOW); \
goto all_done; \
} \
done += _val; \
@@ -154,12 +154,17 @@
do \
{ \
assert ((size_t) done <= (size_t) INT_MAX); \
- if ((size_t) PUT (s, (String), (Len)) != (size_t) (Len) \
- || (size_t) INT_MAX - (size_t) done < (size_t) (Len)) \
+ if ((size_t) PUT (s, (String), (Len)) != (size_t) (Len)) \
{ \
done = -1; \
goto all_done; \
} \
+ if (__builtin_expect (INT_MAX - done < (Len), 0)) \
+ { \
+ done = -1; \
+ __set_errno (EOVERFLOW); \
+ goto all_done; \
+ } \
done += (Len); \
} \
while (0)
@@ -1456,10 +1461,21 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
const UCHAR_T *tmp; /* Temporary value. */
tmp = ++f;
- if (ISDIGIT (*tmp) && read_int (&tmp) && *tmp == L_('$'))
- /* The width comes from a positional parameter. */
- goto do_positional;
+ if (ISDIGIT (*tmp))
+ {
+ int pos = read_int (&tmp);
+ if (pos == -1)
+ {
+ __set_errno (EOVERFLOW);
+ done = -1;
+ goto all_done;
+ }
+
+ if (pos && *tmp == L_('$'))
+ /* The width comes from a positional parameter. */
+ goto do_positional;
+ }
width = va_arg (ap, int);
/* Negative width means left justified. */
@@ -1470,9 +1486,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
left = 1;
}
- if (__builtin_expect (width >= (size_t) -1 / sizeof (CHAR_T) - 32, 0))
+ if (__builtin_expect (width >= INT_MAX / sizeof (CHAR_T) - 32, 0))
{
- __set_errno (ERANGE);
+ __set_errno (EOVERFLOW);
done = -1;
goto all_done;
}
@@ -1502,9 +1518,10 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
LABEL (width):
width = read_int (&f);
- if (__builtin_expect (width >= (size_t) -1 / sizeof (CHAR_T) - 32, 0))
+ if (__builtin_expect (width == -1
+ || width >= INT_MAX / sizeof (CHAR_T) - 32, 0))
{
- __set_errno (ERANGE);
+ __set_errno (EOVERFLOW);
done = -1;
goto all_done;
}
@@ -1539,10 +1556,21 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
const UCHAR_T *tmp; /* Temporary value. */
tmp = ++f;
- if (ISDIGIT (*tmp) && read_int (&tmp) > 0 && *tmp == L_('$'))
- /* The precision comes from a positional parameter. */
- goto do_positional;
+ if (ISDIGIT (*tmp))
+ {
+ int pos = read_int (&tmp);
+
+ if (pos == -1)
+ {
+ __set_errno (EOVERFLOW);
+ done = -1;
+ goto all_done;
+ }
+ if (pos && *tmp == L_('$'))
+ /* The precision comes from a positional parameter. */
+ goto do_positional;
+ }
prec = va_arg (ap, int);
/* If the precision is negative the precision is omitted. */
@@ -1550,15 +1578,26 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
prec = -1;
}
else if (ISDIGIT (*f))
- prec = read_int (&f);
+ {
+ prec = read_int (&f);
+
+ /* The precision was specified in this case as an extremely
+ large positive value. */
+ if (prec == -1)
+ {
+ __set_errno (EOVERFLOW);
+ done = -1;
+ goto all_done;
+ }
+ }
else
prec = 0;
if (prec > width
&& prec > sizeof (work_buffer) / sizeof (work_buffer[0]) - 32)
{
- if (__builtin_expect (prec >= (size_t) -1 / sizeof (CHAR_T) - 32, 0))
+ if (__builtin_expect (prec >= INT_MAX / sizeof (CHAR_T) - 32, 0))
{
- __set_errno (ERANGE);
+ __set_errno (EOVERFLOW);
done = -1;
goto all_done;
}
@@ -1733,9 +1772,9 @@ do_positional:
+ sizeof (*args_type));
/* Check for potential integer overflow. */
- if (__builtin_expect (nargs > SIZE_MAX / bytes_per_arg, 0))
+ if (__builtin_expect (nargs > INT_MAX / bytes_per_arg, 0))
{
- __set_errno (ERANGE);
+ __set_errno (EOVERFLOW);
done = -1;
goto all_done;
}
diff --git a/libc/stdlib/stdlib.h b/libc/stdlib/stdlib.h
index d3bd49275..4da4678f8 100644
--- a/libc/stdlib/stdlib.h
+++ b/libc/stdlib/stdlib.h
@@ -603,8 +603,9 @@ extern int clearenv (void) __THROW;
/* 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 file name unique.
- Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */
-extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;
+ Always returns TEMPLATE, it's either a temporary file name or a null
+ string if it cannot get a unique file name. */
+extern char *mktemp (char *__template) __THROW __nonnull ((1));
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
diff --git a/libc/string/Makefile b/libc/string/Makefile
index 9825a1b58..041db92f9 100644
--- a/libc/string/Makefile
+++ b/libc/string/Makefile
@@ -23,8 +23,8 @@ include ../option-groups.mak
subdir := string
headers := string.h strings.h memory.h endian.h bits/endian.h \
- argz.h envz.h byteswap.h bits/byteswap.h bits/string.h \
- bits/string2.h bits/string3.h
+ argz.h envz.h byteswap.h bits/byteswap.h bits/byteswap-16.h \
+ bits/string.h bits/string2.h bits/string3.h
routines := strcat strchr strcmp strcoll strcpy strcspn \
strverscmp strdup strndup \
diff --git a/libc/string/byteswap.h b/libc/string/byteswap.h
index 18ca95d37..7d769573a 100644
--- a/libc/string/byteswap.h
+++ b/libc/string/byteswap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 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,6 +18,8 @@
#ifndef _BYTESWAP_H
#define _BYTESWAP_H 1
+#include <features.h>
+
/* Get the machine specific, optimized definitions. */
#include <bits/byteswap.h>
@@ -31,7 +33,7 @@
/* Return a value with all bytes in the 32 bit argument swapped. */
#define bswap_32(x) __bswap_32 (x)
-#if defined __GNUC__ && __GNUC__ >= 2
+#if __GLIBC_HAVE_LONG_LONG
/* Return a value with all bytes in the 64 bit argument swapped. */
# define bswap_64(x) __bswap_64 (x)
#endif
diff --git a/libc/string/endian.h b/libc/string/endian.h
index 13e8c75c9..0c293f637 100644
--- a/libc/string/endian.h
+++ b/libc/string/endian.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 2000, 2008 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
@@ -70,10 +70,13 @@
# define be32toh(x) __bswap_32 (x)
# define le32toh(x) (x)
-# define htobe64(x) __bswap_64 (x)
-# define htole64(x) (x)
-# define be64toh(x) __bswap_64 (x)
-# define le64toh(x) (x)
+# if __GLIBC_HAVE_LONG_LONG
+# define htobe64(x) __bswap_64 (x)
+# define htole64(x) (x)
+# define be64toh(x) __bswap_64 (x)
+# define le64toh(x) (x)
+# endif
+
# else
# define htobe16(x) (x)
# define htole16(x) __bswap_16 (x)
@@ -85,10 +88,12 @@
# define be32toh(x) (x)
# define le32toh(x) __bswap_32 (x)
-# define htobe64(x) (x)
-# define htole64(x) __bswap_64 (x)
-# define be64toh(x) (x)
-# define le64toh(x) __bswap_64 (x)
+# if __GLIBC_HAVE_LONG_LONG
+# define htobe64(x) (x)
+# define htole64(x) __bswap_64 (x)
+# define be64toh(x) (x)
+# define le64toh(x) __bswap_64 (x)
+# endif
# endif
#endif
diff --git a/libc/string/memchr.c b/libc/string/memchr.c
index 7de21a6ac..22637cf3a 100644
--- a/libc/string/memchr.c
+++ b/libc/string/memchr.c
@@ -30,8 +30,6 @@
#if defined _LIBC
# include <string.h>
# include <memcopy.h>
-#else
-# define reg_char char
#endif
#if HAVE_STDLIB_H || defined _LIBC
@@ -68,7 +66,7 @@ __memchr (s, c_in, n)
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
diff --git a/libc/string/memrchr.c b/libc/string/memrchr.c
index 5a83a4a9c..2826f1305 100644
--- a/libc/string/memrchr.c
+++ b/libc/string/memrchr.c
@@ -33,8 +33,6 @@
#if defined _LIBC
# include <string.h>
# include <memcopy.h>
-#else
-# define reg_char char
#endif
#if defined HAVE_LIMITS_H || defined _LIBC
@@ -71,7 +69,7 @@ MEMRCHR
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
diff --git a/libc/string/rawmemchr.c b/libc/string/rawmemchr.c
index e92e1b491..90e8c7cb0 100644
--- a/libc/string/rawmemchr.c
+++ b/libc/string/rawmemchr.c
@@ -31,8 +31,6 @@
# include <string.h>
# include <memcopy.h>
# include <stdlib.h>
-#else
-# define reg_char char
#endif
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
@@ -59,7 +57,7 @@ __rawmemchr (s, c_in)
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
diff --git a/libc/string/strcat.c b/libc/string/strcat.c
index 3967fa82d..f9e4bc682 100644
--- a/libc/string/strcat.c
+++ b/libc/string/strcat.c
@@ -28,7 +28,7 @@ strcat (dest, src)
{
char *s1 = dest;
const char *s2 = src;
- reg_char c;
+ char c;
/* Find the end of the string. */
do
diff --git a/libc/string/strchr.c b/libc/string/strchr.c
index 3d4495847..9d18b7eeb 100644
--- a/libc/string/strchr.c
+++ b/libc/string/strchr.c
@@ -36,7 +36,7 @@ strchr (s, c_in)
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
diff --git a/libc/string/strchrnul.c b/libc/string/strchrnul.c
index 523a72f3f..0db5e23fa 100644
--- a/libc/string/strchrnul.c
+++ b/libc/string/strchrnul.c
@@ -36,7 +36,7 @@ __strchrnul (s, c_in)
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
diff --git a/libc/string/strcmp.c b/libc/string/strcmp.c
index e9b24c951..8229d7c77 100644
--- a/libc/string/strcmp.c
+++ b/libc/string/strcmp.c
@@ -30,7 +30,7 @@ strcmp (p1, p2)
{
register const unsigned char *s1 = (const unsigned char *) p1;
register const unsigned char *s2 = (const unsigned char *) p2;
- unsigned reg_char c1, c2;
+ unsigned char c1, c2;
do
{
diff --git a/libc/string/strcpy.c b/libc/string/strcpy.c
index f565f34fc..acc580ba3 100644
--- a/libc/string/strcpy.c
+++ b/libc/string/strcpy.c
@@ -28,7 +28,7 @@ strcpy (dest, src)
char *dest;
const char *src;
{
- reg_char c;
+ char c;
char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);
const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1;
size_t n;
diff --git a/libc/string/strncat.c b/libc/string/strncat.c
index dceadb206..dcfb04d6c 100644
--- a/libc/string/strncat.c
+++ b/libc/string/strncat.c
@@ -19,8 +19,6 @@
#ifdef _LIBC
# include <memcopy.h>
-#else
-typedef char reg_char;
#endif
#ifndef STRNCAT
@@ -31,7 +29,7 @@ typedef char reg_char;
char *
STRNCAT (char *s1, const char *s2, size_t n)
{
- reg_char c;
+ char c;
char *s = s1;
/* Find the end of S1. */
diff --git a/libc/string/strncmp.c b/libc/string/strncmp.c
index f586d592e..d79305a87 100644
--- a/libc/string/strncmp.c
+++ b/libc/string/strncmp.c
@@ -31,8 +31,8 @@
int
STRNCMP (const char *s1, const char *s2, size_t n)
{
- unsigned reg_char c1 = '\0';
- unsigned reg_char c2 = '\0';
+ unsigned char c1 = '\0';
+ unsigned char c2 = '\0';
if (n >= 4)
{
diff --git a/libc/string/strncpy.c b/libc/string/strncpy.c
index f6ee27832..19d501e06 100644
--- a/libc/string/strncpy.c
+++ b/libc/string/strncpy.c
@@ -27,7 +27,7 @@
char *
STRNCPY (char *s1, const char *s2, size_t n)
{
- reg_char c;
+ char c;
char *s = s1;
--s1;
diff --git a/libc/string/test-memcmp.c b/libc/string/test-memcmp.c
index 2e61f5973..69076d00b 100644
--- a/libc/string/test-memcmp.c
+++ b/libc/string/test-memcmp.c
@@ -1,5 +1,5 @@
/* Test and measure memcmp 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 wmemcmp support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011.
@@ -44,6 +44,8 @@ simple_wmemcmp (const wchar_t *s1, const wchar_t *s2, size_t n)
return ret;
}
#else
+# include <limits.h>
+
# define MEMCMP memcmp
# define MEMCPY memcpy
# define SIMPLE_MEMCMP simple_memcmp
diff --git a/libc/string/test-strcmp.c b/libc/string/test-strcmp.c
index 85df6dcd4..000c51091 100644
--- a/libc/string/test-strcmp.c
+++ b/libc/string/test-strcmp.c
@@ -1,5 +1,5 @@
/* Test and measure strcmp and wcscmp 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 wcscmp support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011.
@@ -80,6 +80,8 @@ stupid_wcscmp (const wchar_t *s1, const wchar_t *s2)
}
#else
+# include <limits.h>
+
# define L(str) str
# define STRCMP strcmp
# define STRCPY strcpy
diff --git a/libc/string/test-string.h b/libc/string/test-string.h
index 40fec18e3..c94d822b3 100644
--- a/libc/string/test-string.h
+++ b/libc/string/test-string.h
@@ -1,5 +1,5 @@
/* Test and measure string and memory functions.
- Copyright (C) 1999, 2002, 2004, 2008, 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.
@@ -44,6 +44,7 @@ extern impl_t __start_impls[], __stop_impls[];
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
+#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>
#include <error.h>
diff --git a/libc/sysdeps/generic/ldsodefs.h b/libc/sysdeps/generic/ldsodefs.h
index 4917d80c0..f6458627d 100644
--- a/libc/sysdeps/generic/ldsodefs.h
+++ b/libc/sysdeps/generic/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-2009, 2010, 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
@@ -568,6 +568,9 @@ struct rtld_global_ro
/* Cached value of `getpagesize ()'. */
EXTERN size_t _dl_pagesize;
+ /* Do we read from ld.so.cache? */
+ EXTERN int _dl_inhibit_cache;
+
/* Copy of the content of `_dl_main_searchlist' at startup time. */
EXTERN struct r_scope_elem _dl_initial_searchlist;
diff --git a/libc/sysdeps/generic/math_private.h b/libc/sysdeps/generic/math_private.h
index e2172246f..5267ec327 100644
--- a/libc/sysdeps/generic/math_private.h
+++ b/libc/sysdeps/generic/math_private.h
@@ -213,6 +213,7 @@ extern double __ieee754_yn (int,double);
extern double __ieee754_remainder (double,double);
extern int32_t __ieee754_rem_pio2 (double,double*);
extern double __ieee754_scalb (double,double);
+extern int __ieee754_ilogb (double);
/* fdlibm kernel function */
extern double __kernel_standard (double,double,int);
@@ -260,6 +261,7 @@ extern float __ieee754_ynf (int,float);
extern float __ieee754_remainderf (float,float);
extern int32_t __ieee754_rem_pio2f (float,float*);
extern float __ieee754_scalbf (float,float);
+extern int __ieee754_ilogbf (float);
/* float versions of fdlibm kernel functions */
@@ -305,6 +307,7 @@ extern long double __ieee754_ynl (int,long double);
extern long double __ieee754_remainderl (long double,long double);
extern int __ieee754_rem_pio2l (long double,long double*);
extern long double __ieee754_scalbl (long double,long double);
+extern int __ieee754_ilogbl (long double);
/* long double versions of fdlibm kernel functions */
extern long double __kernel_sinl (long double,long double,int);
diff --git a/libc/sysdeps/generic/memcopy.h b/libc/sysdeps/generic/memcopy.h
index ad2846682..a8e5a44fe 100644
--- a/libc/sysdeps/generic/memcopy.h
+++ b/libc/sysdeps/generic/memcopy.h
@@ -61,9 +61,6 @@
/* Type to use for unaligned operations. */
typedef unsigned char byte;
-/* Optimal type for storing bytes in registers. */
-#define reg_char char
-
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2)))
#endif
diff --git a/libc/sysdeps/gnu/errlist-compat.awk b/libc/sysdeps/gnu/errlist-compat.awk
index 4f70e927c..864733bb4 100644
--- a/libc/sysdeps/gnu/errlist-compat.awk
+++ b/libc/sysdeps/gnu/errlist-compat.awk
@@ -1,5 +1,5 @@
# awk script to generate errlist-compat.c
-# Copyright (C) 2002, 2004, 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
@@ -81,7 +81,7 @@ END {
if (highest > count) {
printf "*** errlist.c count %d inflated to %s count %d (old errno.h?)\n", \
count, highest_version, highest > "/dev/stderr";
- printf "#define ERR_MAX %d\n\n", highest;
+ printf "#define ERR_MAX %d\n\n", highest - 1;
}
# same regardless of awk's ordering of the associative array.
diff --git a/libc/sysdeps/i386/bits/byteswap-16.h b/libc/sysdeps/i386/bits/byteswap-16.h
new file mode 100644
index 000000000..584eb86b7
--- /dev/null
+++ b/libc/sysdeps/i386/bits/byteswap-16.h
@@ -0,0 +1,49 @@
+/* Macros to swap the order of bytes in 16-bit integer values.
+ 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_BYTESWAP_H
+# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
+#endif
+
+#ifdef __GNUC__
+# if __GNUC__ >= 2
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
+ if (__builtin_constant_p (__x)) \
+ __v = __bswap_constant_16 (__x); \
+ else \
+ __asm__ ("rorw $8, %w0" \
+ : "=r" (__v) \
+ : "0" (__x) \
+ : "cc"); \
+ __v; }))
+# else
+/* This is better than nothing. */
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ register unsigned short int __x = (unsigned short int) (x); \
+ __bswap_constant_16 (__x); }))
+# endif
+#else
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
+#endif
diff --git a/libc/sysdeps/i386/bits/byteswap.h b/libc/sysdeps/i386/bits/byteswap.h
index 4a159d19c..354281638 100644
--- a/libc/sysdeps/i386/bits/byteswap.h
+++ b/libc/sysdeps/i386/bits/byteswap.h
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010, 2011
- 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
@@ -28,33 +27,8 @@
#define __bswap_constant_16(x) \
((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
-#ifdef __GNUC__
-# if __GNUC__ >= 2
-# define __bswap_16(x) \
- (__extension__ \
- ({ register unsigned short int __v, __x = (unsigned short int) (x); \
- if (__builtin_constant_p (__x)) \
- __v = __bswap_constant_16 (__x); \
- else \
- __asm__ ("rorw $8, %w0" \
- : "=r" (__v) \
- : "0" (__x) \
- : "cc"); \
- __v; }))
-# else
-/* This is better than nothing. */
-# define __bswap_16(x) \
- (__extension__ \
- ({ register unsigned short int __x = (unsigned short int) (x); \
- __bswap_constant_16 (__x); }))
-# endif
-#else
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
- return __bswap_constant_16 (__bsx);
-}
-#endif
+/* Get __bswap_16. */
+#include <bits/byteswap-16.h>
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
@@ -131,6 +105,22 @@ __bswap_32 (unsigned int __bsx)
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
diff --git a/libc/sysdeps/i386/fpu/bits/fenv.h b/libc/sysdeps/i386/fpu/bits/fenv.h
index 460368ad7..e71ceb7b3 100644
--- a/libc/sysdeps/i386/fpu/bits/fenv.h
+++ b/libc/sysdeps/i386/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2011 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
@@ -121,7 +121,7 @@ __NTH (feraiseexcept (int __excepts))
# ifdef __SSE_MATH__
__asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
# else
- __asm__ __volatile__ ("fdivp %%st(1), %%st; fwait"
+ __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
: "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
# endif
(void) &__f;
diff --git a/libc/sysdeps/i386/fpu/bits/mathinline.h b/libc/sysdeps/i386/fpu/bits/mathinline.h
index 276acf8e7..6561ebaa3 100644
--- a/libc/sysdeps/i386/fpu/bits/mathinline.h
+++ b/libc/sysdeps/i386/fpu/bits/mathinline.h
@@ -1,6 +1,5 @@
/* Inline math functions for i387.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2003,2004,2006,2007,2009,
- 2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by John C. Bowman <bowman@math.ualberta.ca>, 1995.
@@ -324,22 +323,23 @@ __inline_mathcode (__pow2, __x, \
# define __sincos_code \
register long double __cosr; \
register long double __sinr; \
+ register unsigned int __swtmp; \
__asm __volatile__ \
("fsincos\n\t" \
- "fnstsw %%ax\n\t" \
- "testl $0x400, %%eax\n\t" \
+ "fnstsw %w2\n\t" \
+ "testl $0x400, %2\n\t" \
"jz 1f\n\t" \
"fldpi\n\t" \
"fadd %%st(0)\n\t" \
"fxch %%st(1)\n\t" \
"2: fprem1\n\t" \
- "fnstsw %%ax\n\t" \
- "testl $0x400, %%eax\n\t" \
+ "fnstsw %w2\n\t" \
+ "testl $0x400, %2\n\t" \
"jnz 2b\n\t" \
"fstp %%st(1)\n\t" \
"fsincos\n\t" \
"1:" \
- : "=t" (__cosr), "=u" (__sinr) : "0" (__x)); \
+ : "=t" (__cosr), "=u" (__sinr), "=a" (__swtmp) : "0" (__x)); \
*__sinx = __sinr; \
*__cosx = __cosr
diff --git a/libc/sysdeps/i386/fpu/s_ilogb.S b/libc/sysdeps/i386/fpu/e_ilogb.S
index 0cf1ad741..29ef2214e 100644
--- a/libc/sysdeps/i386/fpu/s_ilogb.S
+++ b/libc/sysdeps/i386/fpu/e_ilogb.S
@@ -7,7 +7,7 @@
RCSID("$NetBSD: s_ilogb.S,v 1.5 1995/10/12 15:53:09 jtc Exp $")
-ENTRY(__ilogb)
+ENTRY(__ieee754_ilogb)
fldl 4(%esp)
/* I added the following ugly construct because ilogb(+-Inf) is
required to return INT_MAX in ISO C99.
@@ -18,6 +18,8 @@ ENTRY(__ilogb)
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
+ cmpb $0x40, %dh
+ je 2f /* Is +-0, jump. */
fxtract
pushl %eax
@@ -34,5 +36,7 @@ ENTRY(__ilogb)
1: fstp %st
movl $0x7fffffff, %eax
ret
-END (__ilogb)
-weak_alias (__ilogb, ilogb)
+2: fstp %st
+ movl $0x80000000, %eax /* FP_ILOGB0 */
+ ret
+END (__ieee754_ilogb)
diff --git a/libc/sysdeps/i386/fpu/s_ilogbf.S b/libc/sysdeps/i386/fpu/e_ilogbf.S
index 99e53edd7..d72de6c84 100644
--- a/libc/sysdeps/i386/fpu/s_ilogbf.S
+++ b/libc/sysdeps/i386/fpu/e_ilogbf.S
@@ -7,7 +7,7 @@
RCSID("$NetBSD: s_ilogbf.S,v 1.4 1995/10/22 20:32:43 pk Exp $")
-ENTRY(__ilogbf)
+ENTRY(__ieee754_ilogbf)
flds 4(%esp)
/* I added the following ugly construct because ilogb(+-Inf) is
required to return INT_MAX in ISO C99.
@@ -18,6 +18,8 @@ ENTRY(__ilogbf)
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
+ cmpb $0x40, %dh
+ je 2f /* Is +-0, jump. */
fxtract
pushl %eax
@@ -34,5 +36,7 @@ ENTRY(__ilogbf)
1: fstp %st
movl $0x7fffffff, %eax
ret
-END (__ilogbf)
-weak_alias (__ilogbf, ilogbf)
+2: fstp %st
+ movl $0x80000000, %eax /* FP_ILOGB0 */
+ ret
+END (__ieee754_ilogbf)
diff --git a/libc/sysdeps/i386/fpu/s_ilogbl.S b/libc/sysdeps/i386/fpu/e_ilogbl.S
index 1f559b311..60761dfa3 100644
--- a/libc/sysdeps/i386/fpu/s_ilogbl.S
+++ b/libc/sysdeps/i386/fpu/e_ilogbl.S
@@ -8,7 +8,7 @@
RCSID("$NetBSD: $")
-ENTRY(__ilogbl)
+ENTRY(__ieee754_ilogbl)
fldt 4(%esp)
/* I added the following ugly construct because ilogb(+-Inf) is
required to return INT_MAX in ISO C99.
@@ -19,6 +19,8 @@ ENTRY(__ilogbl)
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
+ cmpb $0x40, %dh
+ je 2f /* Is +-0, jump. */
fxtract
pushl %eax
@@ -35,5 +37,7 @@ ENTRY(__ilogbl)
1: fstp %st
movl $0x7fffffff, %eax
ret
-END (__ilogbl)
-weak_alias (__ilogbl, ilogbl)
+2: fstp %st
+ movl $0x80000000, %eax /* FP_ILOGB0 */
+ ret
+END (__ieee754_ilogbl)
diff --git a/libc/sysdeps/i386/fpu/e_pow.S b/libc/sysdeps/i386/fpu/e_pow.S
index b61a94608..73d242116 100644
--- a/libc/sysdeps/i386/fpu/e_pow.S
+++ b/libc/sysdeps/i386/fpu/e_pow.S
@@ -32,6 +32,9 @@ limit: .double 0.29
ASM_TYPE_DIRECTIVE(p63,@object)
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
+ ASM_TYPE_DIRECTIVE(p10,@object)
+p10: .byte 0, 0, 0, 0, 0, 0, 0x90, 0x40
+ ASM_SIZE_DIRECTIVE(p10)
.section .rodata.cst16,"aM",@progbits,16
@@ -116,7 +119,15 @@ ENTRY(__ieee754_pow)
sahf
jne 3f
- /* OK, we have an integer value for y. */
+ /* OK, we have an integer value for y. If large enough that
+ errors may propagate out of the 11 bits excess precision, use
+ the algorithm for real exponent instead. */
+ fld %st // y : y : x
+ fabs // |y| : y : x
+ fcompl MO(p10) // y : x
+ fnstsw
+ sahf
+ jnc 2f
popl %eax
cfi_adjust_cfa_offset (-4)
popl %edx
@@ -157,7 +168,9 @@ ENTRY(__ieee754_pow)
cfi_adjust_cfa_offset (8)
.align ALIGNARG(4)
-2: /* y is a large integer (so even). */
+2: // y is a large integer (absolute value at least 1L<<10), but
+ // may be odd unless at least 1L<<64. So it may be necessary
+ // to adjust the sign of a negative result afterwards.
fxch // x : y
fabs // |x| : y
fxch // y : x
@@ -187,9 +200,41 @@ ENTRY(__ieee754_pow)
f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
- addl $8, %esp
- cfi_adjust_cfa_offset (-8)
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
+ testb $2, %dh
+ jz 292f
+ // x is negative. If y is an odd integer, negate the result.
+ fldl 20(%esp) // y : abs(result)
+ fld %st // y : y : abs(result)
+ fabs // |y| : y : abs(result)
+ fcompl MO(p63) // y : abs(result)
+ fnstsw
+ sahf
+ jnc 291f
+
+ // We must find out whether y is an odd integer.
+ fld %st // y : y : abs(result)
+ fistpll (%esp) // y : abs(result)
+ fildll (%esp) // int(y) : y : abs(result)
+ fucompp // abs(result)
+ fnstsw
+ sahf
+ jne 292f
+
+ // OK, the value is an integer, but is it odd?
+ popl %eax
+ cfi_adjust_cfa_offset (-4)
+ popl %edx
+ cfi_adjust_cfa_offset (-4)
+ andb $1, %al
+ jz 290f // jump if not odd
+ // It's an odd integer.
+ fchs
+290: ret
+ cfi_adjust_cfa_offset (8)
+291: fstp %st(0) // abs(result)
+292: addl $8, %esp
+ cfi_adjust_cfa_offset (-8)
ret
diff --git a/libc/sysdeps/i386/fpu/e_powl.S b/libc/sysdeps/i386/fpu/e_powl.S
index 0e7c05bb8..5b166eab4 100644
--- a/libc/sysdeps/i386/fpu/e_powl.S
+++ b/libc/sysdeps/i386/fpu/e_powl.S
@@ -35,6 +35,9 @@ p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_TYPE_DIRECTIVE(p64,@object)
p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(p64)
+ ASM_TYPE_DIRECTIVE(p78,@object)
+p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
+ ASM_SIZE_DIRECTIVE(p78)
.section .rodata.cst16,"aM",@progbits,16
@@ -166,6 +169,21 @@ ENTRY(__ieee754_powl)
fxch // x : y
fabs // |x| : y
fxch // y : |x|
+ // If y has absolute value at least 1L<<78, then any finite
+ // nonzero x will result in 0 (underflow), 1 or infinity (overflow).
+ // Saturate y to those bounds to avoid overflow in the calculation
+ // of y*log2(x).
+ fld %st // y : y : |x|
+ fabs // |y| : y : |x|
+ fcompl MO(p78) // y : |x|
+ fnstsw
+ sahf
+ jc 3f
+ fstp %st(0) // pop y
+ fldl MO(p78) // 1L<<78 : |x|
+ testb $2, %dl
+ jz 3f // y > 0
+ fchs // -(1L<<78) : |x|
.align ALIGNARG(4)
3: /* y is a real number. */
fxch // x : y
@@ -185,11 +203,6 @@ ENTRY(__ieee754_powl)
7: fyl2x // log2(x) : y
8: fmul %st(1) // y*log2(x) : y
- fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x05, %ah // is y*log2(x) == ±inf ?
- je 28f
fst %st(1) // y*log2(x) : y*log2(x)
frndint // int(y*log2(x)) : y*log2(x)
fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
@@ -198,13 +211,7 @@ ENTRY(__ieee754_powl)
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
- jmp 29f
-
-28: fstp %st(1) // y*log2(x)
- fldl MO(one) // 1 : y*log2(x)
- fscale // 2^(y*log2(x)) : y*log2(x)
- fstp %st(1) // 2^(y*log2(x))
-29: testb $2, %dh
+ testb $2, %dh
jz 292f
// x is negative. If y is an odd integer, negate the result.
fldt 24(%esp) // y : abs(result)
diff --git a/libc/sysdeps/i386/fpu/libm-test-ulps b/libc/sysdeps/i386/fpu/libm-test-ulps
index 1c791405a..c3a3ce0da 100644
--- a/libc/sysdeps/i386/fpu/libm-test-ulps
+++ b/libc/sysdeps/i386/fpu/libm-test-ulps
@@ -1009,9 +1009,33 @@ idouble: 1
ifloat: 1
ildouble: 3
ldouble: 3
+Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+double: 1
+idouble: 1
+ildouble: 1
+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 "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+float: 1
+ifloat: 1
ildouble: 3
ldouble: 3
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -1019,9 +1043,14 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
float: 1
@@ -1034,6 +1063,25 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+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
+Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
@@ -2342,33 +2390,35 @@ ldouble: 1
Function: Real part of "ctan":
double: 1
+float: 1
idouble: 1
-ildouble: 1
-ldouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "ctan":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "erf":
double: 1
diff --git a/libc/sysdeps/i386/i686/memset_chk.S b/libc/sysdeps/i386/i686/memset_chk.S
index 504fc06b1..12a679dbb 100644
--- a/libc/sysdeps/i386/i686/memset_chk.S
+++ b/libc/sysdeps/i386/i686/memset_chk.S
@@ -1,5 +1,5 @@
/* Checking memset for i686.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 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
@@ -19,7 +19,7 @@
#include <sysdep.h>
#include "asm-syntax.h"
-#ifndef PIC
+#ifndef SHARED
/* For libc.so this is defined in memset.S.
For libc.a, this is a separate source to avoid
memset bringing in __chk_fail and all routines
diff --git a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
index 3a3ab792a..30bdad6e8 100644
--- a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+++ b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
@@ -17,109 +17,100 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#if !defined NOT_IN_libc \
&& (defined SHARED \
|| defined USE_AS_MEMMOVE \
|| !defined USE_MULTIARCH)
-#include "asm-syntax.h"
+# include <sysdep.h>
+# include "asm-syntax.h"
-#ifndef MEMCPY
-# define MEMCPY __memcpy_ssse3
-# define MEMCPY_CHK __memcpy_chk_ssse3
-#endif
+# ifndef MEMCPY
+# define MEMCPY __memcpy_ssse3
+# define MEMCPY_CHK __memcpy_chk_ssse3
+# endif
-#ifdef USE_AS_BCOPY
-# define SRC PARMS
-# define DEST SRC+4
-# define LEN DEST+4
-#else
-# define DEST PARMS
-# define SRC DEST+4
-# define LEN SRC+4
-#endif
+# ifdef USE_AS_BCOPY
+# define SRC PARMS
+# define DEST SRC+4
+# define LEN DEST+4
+# else
+# define DEST PARMS
+# define SRC DEST+4
+# define LEN SRC+4
+# endif
-#define CFI_PUSH(REG) \
- cfi_adjust_cfa_offset (4); \
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
cfi_rel_offset (REG, 0)
-#define CFI_POP(REG) \
- cfi_adjust_cfa_offset (-4); \
+# 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 PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
-#ifdef SHARED
-# define PARMS 8 /* Preserve EBX. */
-# define ENTRANCE PUSH (%ebx);
-# define RETURN_END POP (%ebx); ret
-# define RETURN RETURN_END; CFI_PUSH (%ebx)
-# define JMPTBL(I, B) I - B
+# ifdef SHARED
+# define PARMS 8 /* Preserve EBX. */
+# define ENTRANCE PUSH (%ebx);
+# define RETURN_END POP (%ebx); ret
+# define RETURN RETURN_END; CFI_PUSH (%ebx)
+# define JMPTBL(I, B) I - B
/* Load an entry in a jump table into EBX and branch to it. TABLE is a
- jump table with relative offsets. INDEX is a register contains the
- index into the jump table. SCALE is the scale of INDEX. */
-# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
- /* We first load PC into EBX. */ \
- SETUP_PIC_REG(bx); \
- /* Get the address of the jump table. */ \
- addl $(TABLE - .), %ebx; \
- /* Get the entry and convert the relative offset to the \
- absolute address. */ \
- addl (%ebx,INDEX,SCALE), %ebx; \
- /* We loaded the jump table. Go. */ \
- jmp *%ebx
-
-# define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) \
- addl $(TABLE - .), %ebx
-
-# define BRANCH_TO_JMPTBL_ENTRY_TAIL(TABLE, INDEX, SCALE) \
- addl (%ebx,INDEX,SCALE), %ebx; \
- /* We loaded the jump table. Go. */ \
- jmp *%ebx
-#else
-# define PARMS 4
-# define ENTRANCE
-# define RETURN_END ret
-# define RETURN RETURN_END
-# define JMPTBL(I, B) I
+ jump table with relative offsets. INDEX is a register contains the
+ index into the jump table. SCALE is the scale of INDEX. */
+
+# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
+ /* We first load PC into EBX. */ \
+ SETUP_PIC_REG(bx); \
+ /* Get the address of the jump table. */ \
+ addl $(TABLE - .), %ebx; \
+ /* Get the entry and convert the relative offset to the \
+ absolute address. */ \
+ addl (%ebx, INDEX, SCALE), %ebx; \
+ /* We loaded the jump table. Go. */ \
+ jmp *%ebx
+# else
-/* Branch to an entry in a jump table. TABLE is a jump table with
- absolute offsets. INDEX is a register contains the index into the
- jump table. SCALE is the scale of INDEX. */
-# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
- jmp *TABLE(,INDEX,SCALE)
+# define PARMS 4
+# define ENTRANCE
+# define RETURN_END ret
+# define RETURN RETURN_END
+# define JMPTBL(I, B) I
-# define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE)
+/* Branch to an entry in a jump table. TABLE is a jump table with
+ absolute offsets. INDEX is a register contains the index into the
+ jump table. SCALE is the scale of INDEX. */
-# define BRANCH_TO_JMPTBL_ENTRY_TAIL(TABLE, INDEX, SCALE) \
- jmp *TABLE(,INDEX,SCALE)
-#endif
+# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
+ jmp *TABLE(, INDEX, SCALE)
+# endif
.section .text.ssse3,"ax",@progbits
-#if !defined USE_AS_BCOPY
+# if !defined USE_AS_BCOPY
ENTRY (MEMCPY_CHK)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
jb HIDDEN_JUMPTARGET (__chk_fail)
END (MEMCPY_CHK)
-#endif
+# endif
ENTRY (MEMCPY)
ENTRANCE
movl LEN(%esp), %ecx
movl SRC(%esp), %eax
movl DEST(%esp), %edx
-#ifdef USE_AS_MEMMOVE
+# ifdef USE_AS_MEMMOVE
cmp %eax, %edx
jb L(copy_forward)
je L(fwd_write_0bytes)
cmp $32, %ecx
jae L(memmove_bwd)
jmp L(bk_write_less32bytes_2)
+
+ .p2align 4
L(memmove_bwd):
add %ecx, %eax
cmp %eax, %edx
@@ -127,67 +118,72 @@ L(memmove_bwd):
jb L(copy_backward)
L(copy_forward):
-#endif
+# endif
cmp $48, %ecx
jae L(48bytesormore)
L(fwd_write_less32bytes):
-#ifndef USE_AS_MEMMOVE
+# ifndef USE_AS_MEMMOVE
cmp %dl, %al
jb L(bk_write)
-#endif
+# endif
add %ecx, %edx
add %ecx, %eax
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
-#ifndef USE_AS_MEMMOVE
+# ifndef USE_AS_MEMMOVE
+ .p2align 4
L(bk_write):
BRANCH_TO_JMPTBL_ENTRY (L(table_48_bytes_bwd), %ecx, 4)
-#endif
+# endif
- ALIGN (4)
-/* ECX > 32 and EDX is 4 byte aligned. */
+ .p2align 4
L(48bytesormore):
+# ifndef USE_AS_MEMMOVE
+ movlpd (%eax), %xmm0
+ movlpd 8(%eax), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 8(%edx)
+# else
movdqu (%eax), %xmm0
+# endif
PUSH (%edi)
movl %edx, %edi
and $-16, %edx
- PUSH (%esi)
- cfi_remember_state
add $16, %edx
- movl %edi, %esi
sub %edx, %edi
add %edi, %ecx
sub %edi, %eax
-#ifdef SHARED_CACHE_SIZE_HALF
+# ifdef SHARED_CACHE_SIZE_HALF
cmp $SHARED_CACHE_SIZE_HALF, %ecx
-#else
-# ifdef SHARED
+# else
+# ifdef SHARED
SETUP_PIC_REG(bx)
add $_GLOBAL_OFFSET_TABLE_, %ebx
cmp __x86_shared_cache_size_half@GOTOFF(%ebx), %ecx
-# else
+# else
cmp __x86_shared_cache_size_half, %ecx
+# endif
# endif
-#endif
mov %eax, %edi
jae L(large_page)
and $0xf, %edi
jz L(shl_0)
-
BRANCH_TO_JMPTBL_ENTRY (L(shl_table), %edi, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_0):
- movdqu %xmm0, (%esi)
+# ifdef USE_AS_MEMMOVE
+ movl DEST+4(%esp), %edi
+ movdqu %xmm0, (%edi)
+# endif
xor %edi, %edi
- POP (%esi)
cmp $127, %ecx
ja L(shl_0_gobble)
lea -32(%ecx), %ecx
+
+ .p2align 4
L(shl_0_loop):
movdqa (%eax, %edi), %xmm0
movdqa 16(%eax, %edi), %xmm1
@@ -219,6 +215,7 @@ L(shl_0_loop):
movdqa %xmm0, (%edx, %edi)
movdqa %xmm1, 16(%edx, %edi)
lea 32(%edi), %edi
+
L(shl_0_end):
lea 32(%ecx), %ecx
add %ecx, %edi
@@ -228,23 +225,25 @@ L(shl_0_end):
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd_align), %ecx, 4)
CFI_PUSH (%edi)
-L(shl_0_gobble):
-#ifdef DATA_CACHE_SIZE_HALF
+ .p2align 4
+L(shl_0_gobble):
+# ifdef DATA_CACHE_SIZE_HALF
cmp $DATA_CACHE_SIZE_HALF, %ecx
-#else
-# ifdef SHARED
+# else
+# ifdef SHARED
SETUP_PIC_REG(bx)
add $_GLOBAL_OFFSET_TABLE_, %ebx
cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
-# else
+# else
cmp __x86_data_cache_size_half, %ecx
+# endif
# endif
-#endif
-
- POP (%edi)
+ POP (%edi)
lea -128(%ecx), %ecx
jae L(shl_0_gobble_mem_loop)
+
+ .p2align 4
L(shl_0_gobble_cache_loop):
movdqa (%eax), %xmm0
movdqa 0x10(%eax), %xmm1
@@ -274,17 +273,15 @@ L(shl_0_gobble_cache_loop):
movdqa (%eax), %xmm0
sub $0x40, %ecx
movdqa 0x10(%eax), %xmm1
-
movdqa %xmm0, (%edx)
movdqa %xmm1, 0x10(%edx)
-
movdqa 0x20(%eax), %xmm0
movdqa 0x30(%eax), %xmm1
add $0x40, %eax
-
movdqa %xmm0, 0x20(%edx)
movdqa %xmm1, 0x30(%edx)
add $0x40, %edx
+
L(shl_0_cache_less_64bytes):
cmp $0x20, %ecx
jb L(shl_0_cache_less_32bytes)
@@ -295,6 +292,7 @@ L(shl_0_cache_less_64bytes):
movdqa %xmm0, (%edx)
movdqa %xmm1, 0x10(%edx)
add $0x20, %edx
+
L(shl_0_cache_less_32bytes):
cmp $0x10, %ecx
jb L(shl_0_cache_less_16bytes)
@@ -303,13 +301,13 @@ L(shl_0_cache_less_32bytes):
add $0x10, %eax
movdqa %xmm0, (%edx)
add $0x10, %edx
+
L(shl_0_cache_less_16bytes):
add %ecx, %edx
add %ecx, %eax
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
-
- ALIGN (4)
+ .p2align 4
L(shl_0_gobble_mem_loop):
prefetcht0 0x1c0(%eax)
prefetcht0 0x280(%eax)
@@ -354,6 +352,7 @@ L(shl_0_gobble_mem_loop):
movdqa %xmm0, 0x20(%edx)
movdqa %xmm1, 0x30(%edx)
add $0x40, %edx
+
L(shl_0_mem_less_64bytes):
cmp $0x20, %ecx
jb L(shl_0_mem_less_32bytes)
@@ -364,6 +363,7 @@ L(shl_0_mem_less_64bytes):
movdqa %xmm0, (%edx)
movdqa %xmm1, 0x10(%edx)
add $0x20, %edx
+
L(shl_0_mem_less_32bytes):
cmp $0x10, %ecx
jb L(shl_0_mem_less_16bytes)
@@ -372,24 +372,84 @@ L(shl_0_mem_less_32bytes):
add $0x10, %eax
movdqa %xmm0, (%edx)
add $0x10, %edx
+
L(shl_0_mem_less_16bytes):
add %ecx, %edx
add %ecx, %eax
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd_align), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_1):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -1(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -1(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_1_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl1LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 15(%eax), %xmm2
+ movaps 31(%eax), %xmm3
+ movaps 47(%eax), %xmm4
+ movaps 63(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $1, %xmm4, %xmm5
+ palignr $1, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $1, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $1, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl1LoopStart)
+
+L(Shl1LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 15(%eax), %xmm2
+ movaps 31(%eax), %xmm3
+ palignr $1, %xmm2, %xmm3
+ palignr $1, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_1_no_prefetch):
+ lea -32(%ecx), %ecx
lea -1(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_1_loop):
+ .p2align 4
+L(sh_1_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -399,8 +459,7 @@ L(shl_1_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_1_end)
+ jb L(sh_1_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -411,30 +470,90 @@ L(shl_1_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_1_no_prefetch_loop)
- jae L(shl_1_loop)
-
-L(shl_1_end):
+L(sh_1_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 1(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_2):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -2(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -2(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_2_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl2LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 14(%eax), %xmm2
+ movaps 30(%eax), %xmm3
+ movaps 46(%eax), %xmm4
+ movaps 62(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $2, %xmm4, %xmm5
+ palignr $2, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $2, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $2, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl2LoopStart)
+
+L(Shl2LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 14(%eax), %xmm2
+ movaps 30(%eax), %xmm3
+ palignr $2, %xmm2, %xmm3
+ palignr $2, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_2_no_prefetch):
+ lea -32(%ecx), %ecx
lea -2(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_2_loop):
+ .p2align 4
+L(sh_2_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -444,8 +563,7 @@ L(shl_2_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_2_end)
+ jb L(sh_2_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -456,30 +574,90 @@ L(shl_2_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_2_no_prefetch_loop)
- jae L(shl_2_loop)
-
-L(shl_2_end):
+L(sh_2_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 2(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_3):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -3(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -3(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_3_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl3LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 13(%eax), %xmm2
+ movaps 29(%eax), %xmm3
+ movaps 45(%eax), %xmm4
+ movaps 61(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $3, %xmm4, %xmm5
+ palignr $3, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $3, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $3, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl3LoopStart)
+
+L(Shl3LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 13(%eax), %xmm2
+ movaps 29(%eax), %xmm3
+ palignr $3, %xmm2, %xmm3
+ palignr $3, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_3_no_prefetch):
+ lea -32(%ecx), %ecx
lea -3(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_3_loop):
+ .p2align 4
+L(sh_3_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -490,7 +668,7 @@ L(shl_3_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jb L(shl_3_end)
+ jb L(sh_3_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -502,29 +680,90 @@ L(shl_3_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jae L(shl_3_loop)
+ jae L(sh_3_no_prefetch_loop)
-L(shl_3_end):
+L(sh_3_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 3(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_4):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -4(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -4(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_4_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl4LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 12(%eax), %xmm2
+ movaps 28(%eax), %xmm3
+ movaps 44(%eax), %xmm4
+ movaps 60(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm5
+ palignr $4, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $4, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl4LoopStart)
+
+L(Shl4LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 12(%eax), %xmm2
+ movaps 28(%eax), %xmm3
+ palignr $4, %xmm2, %xmm3
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_4_no_prefetch):
+ lea -32(%ecx), %ecx
lea -4(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_4_loop):
+ .p2align 4
+L(sh_4_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -535,7 +774,7 @@ L(shl_4_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jb L(shl_4_end)
+ jb L(sh_4_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -547,29 +786,90 @@ L(shl_4_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jae L(shl_4_loop)
+ jae L(sh_4_no_prefetch_loop)
-L(shl_4_end):
+L(sh_4_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 4(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_5):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -5(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -5(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_5_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl5LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 11(%eax), %xmm2
+ movaps 27(%eax), %xmm3
+ movaps 43(%eax), %xmm4
+ movaps 59(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $5, %xmm4, %xmm5
+ palignr $5, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $5, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $5, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl5LoopStart)
+
+L(Shl5LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 11(%eax), %xmm2
+ movaps 27(%eax), %xmm3
+ palignr $5, %xmm2, %xmm3
+ palignr $5, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_5_no_prefetch):
+ lea -32(%ecx), %ecx
lea -5(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_5_loop):
+ .p2align 4
+L(sh_5_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -580,7 +880,7 @@ L(shl_5_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jb L(shl_5_end)
+ jb L(sh_5_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -592,29 +892,90 @@ L(shl_5_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jae L(shl_5_loop)
+ jae L(sh_5_no_prefetch_loop)
-L(shl_5_end):
+L(sh_5_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 5(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_6):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -6(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -6(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_6_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl6LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 10(%eax), %xmm2
+ movaps 26(%eax), %xmm3
+ movaps 42(%eax), %xmm4
+ movaps 58(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $6, %xmm4, %xmm5
+ palignr $6, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $6, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $6, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl6LoopStart)
+
+L(Shl6LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 10(%eax), %xmm2
+ movaps 26(%eax), %xmm3
+ palignr $6, %xmm2, %xmm3
+ palignr $6, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_6_no_prefetch):
+ lea -32(%ecx), %ecx
lea -6(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_6_loop):
+ .p2align 4
+L(sh_6_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -625,7 +986,7 @@ L(shl_6_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jb L(shl_6_end)
+ jb L(sh_6_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -637,29 +998,90 @@ L(shl_6_loop):
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
- jae L(shl_6_loop)
+ jae L(sh_6_no_prefetch_loop)
-L(shl_6_end):
+L(sh_6_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 6(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_7):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -7(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -7(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_7_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl7LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 9(%eax), %xmm2
+ movaps 25(%eax), %xmm3
+ movaps 41(%eax), %xmm4
+ movaps 57(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $7, %xmm4, %xmm5
+ palignr $7, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $7, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $7, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl7LoopStart)
+
+L(Shl7LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 9(%eax), %xmm2
+ movaps 25(%eax), %xmm3
+ palignr $7, %xmm2, %xmm3
+ palignr $7, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_7_no_prefetch):
+ lea -32(%ecx), %ecx
lea -7(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_7_loop):
+ .p2align 4
+L(sh_7_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -669,8 +1091,7 @@ L(shl_7_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_7_end)
+ jb L(sh_7_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -681,30 +1102,90 @@ L(shl_7_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_7_no_prefetch_loop)
- jae L(shl_7_loop)
-
-L(shl_7_end):
+L(sh_7_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 7(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_8):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -8(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -8(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_8_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl8LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 8(%eax), %xmm2
+ movaps 24(%eax), %xmm3
+ movaps 40(%eax), %xmm4
+ movaps 56(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $8, %xmm4, %xmm5
+ palignr $8, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $8, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl8LoopStart)
+
+L(LoopLeave8):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 8(%eax), %xmm2
+ movaps 24(%eax), %xmm3
+ palignr $8, %xmm2, %xmm3
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_8_no_prefetch):
+ lea -32(%ecx), %ecx
lea -8(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_8_loop):
+ .p2align 4
+L(sh_8_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -714,8 +1195,7 @@ L(shl_8_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_8_end)
+ jb L(sh_8_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -726,30 +1206,91 @@ L(shl_8_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_8_no_prefetch_loop)
- jae L(shl_8_loop)
-
-L(shl_8_end):
+L(sh_8_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 8(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(shl_9):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -9(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -9(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_9_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl9LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 7(%eax), %xmm2
+ movaps 23(%eax), %xmm3
+ movaps 39(%eax), %xmm4
+ movaps 55(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $9, %xmm4, %xmm5
+ palignr $9, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $9, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $9, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl9LoopStart)
+
+L(Shl9LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 7(%eax), %xmm2
+ movaps 23(%eax), %xmm3
+ palignr $9, %xmm2, %xmm3
+ palignr $9, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_9_no_prefetch):
+ lea -32(%ecx), %ecx
lea -9(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_9_loop):
+ .p2align 4
+L(sh_9_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -759,8 +1300,7 @@ L(shl_9_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_9_end)
+ jb L(sh_9_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -771,30 +1311,91 @@ L(shl_9_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_9_no_prefetch_loop)
- jae L(shl_9_loop)
-
-L(shl_9_end):
+L(sh_9_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 9(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_10):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -10(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -10(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_10_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl10LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 6(%eax), %xmm2
+ movaps 22(%eax), %xmm3
+ movaps 38(%eax), %xmm4
+ movaps 54(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $10, %xmm4, %xmm5
+ palignr $10, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $10, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $10, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl10LoopStart)
+
+L(Shl10LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 6(%eax), %xmm2
+ movaps 22(%eax), %xmm3
+ palignr $10, %xmm2, %xmm3
+ palignr $10, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_10_no_prefetch):
+ lea -32(%ecx), %ecx
lea -10(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_10_loop):
+ .p2align 4
+L(sh_10_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -804,8 +1405,7 @@ L(shl_10_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_10_end)
+ jb L(sh_10_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -816,30 +1416,91 @@ L(shl_10_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_10_no_prefetch_loop)
- jae L(shl_10_loop)
-
-L(shl_10_end):
+L(sh_10_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 10(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_11):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -11(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -11(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_11_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl11LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 5(%eax), %xmm2
+ movaps 21(%eax), %xmm3
+ movaps 37(%eax), %xmm4
+ movaps 53(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $11, %xmm4, %xmm5
+ palignr $11, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $11, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $11, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl11LoopStart)
+
+L(Shl11LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 5(%eax), %xmm2
+ movaps 21(%eax), %xmm3
+ palignr $11, %xmm2, %xmm3
+ palignr $11, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_11_no_prefetch):
+ lea -32(%ecx), %ecx
lea -11(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_11_loop):
+ .p2align 4
+L(sh_11_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -849,8 +1510,7 @@ L(shl_11_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_11_end)
+ jb L(sh_11_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -861,30 +1521,91 @@ L(shl_11_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_11_no_prefetch_loop)
- jae L(shl_11_loop)
-
-L(shl_11_end):
+L(sh_11_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 11(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_12):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -12(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -12(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_12_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl12LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 4(%eax), %xmm2
+ movaps 20(%eax), %xmm3
+ movaps 36(%eax), %xmm4
+ movaps 52(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $12, %xmm4, %xmm5
+ palignr $12, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $12, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl12LoopStart)
+
+L(Shl12LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 4(%eax), %xmm2
+ movaps 20(%eax), %xmm3
+ palignr $12, %xmm2, %xmm3
+ palignr $12, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_12_no_prefetch):
+ lea -32(%ecx), %ecx
lea -12(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_12_loop):
+ .p2align 4
+L(sh_12_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -894,8 +1615,7 @@ L(shl_12_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_12_end)
+ jb L(sh_12_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -906,30 +1626,91 @@ L(shl_12_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_12_no_prefetch_loop)
- jae L(shl_12_loop)
-
-L(shl_12_end):
+L(sh_12_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 12(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_13):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -13(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -13(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_13_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl13LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 3(%eax), %xmm2
+ movaps 19(%eax), %xmm3
+ movaps 35(%eax), %xmm4
+ movaps 51(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $13, %xmm4, %xmm5
+ palignr $13, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $13, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $13, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl13LoopStart)
+
+L(Shl13LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 3(%eax), %xmm2
+ movaps 19(%eax), %xmm3
+ palignr $13, %xmm2, %xmm3
+ palignr $13, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_13_no_prefetch):
+ lea -32(%ecx), %ecx
lea -13(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_13_loop):
+ .p2align 4
+L(sh_13_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -939,8 +1720,7 @@ L(shl_13_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_13_end)
+ jb L(sh_13_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -951,30 +1731,91 @@ L(shl_13_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_13_no_prefetch_loop)
- jae L(shl_13_loop)
-
-L(shl_13_end):
+L(sh_13_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 13(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_14):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -14(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -14(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_14_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl14LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 2(%eax), %xmm2
+ movaps 18(%eax), %xmm3
+ movaps 34(%eax), %xmm4
+ movaps 50(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $14, %xmm4, %xmm5
+ palignr $14, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $14, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $14, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl14LoopStart)
+
+L(Shl14LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 2(%eax), %xmm2
+ movaps 18(%eax), %xmm3
+ palignr $14, %xmm2, %xmm3
+ palignr $14, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_14_no_prefetch):
+ lea -32(%ecx), %ecx
lea -14(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_14_loop):
+ .p2align 4
+L(sh_14_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -984,8 +1825,7 @@ L(shl_14_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_14_end)
+ jb L(sh_14_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -996,30 +1836,91 @@ L(shl_14_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_14_no_prefetch_loop)
- jae L(shl_14_loop)
-
-L(shl_14_end):
+L(sh_14_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 14(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shl_15):
- BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
+# ifndef USE_AS_MEMMOVE
+ movaps -15(%eax), %xmm1
+# else
+ movl DEST+4(%esp), %edi
+ movaps -15(%eax), %xmm1
+ movdqu %xmm0, (%edi)
+# endif
+# ifdef DATA_CACHE_SIZE_HALF
+ cmp $DATA_CACHE_SIZE_HALF, %ecx
+# else
+# ifdef SHARED
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size_half@GOTOFF(%ebx), %ecx
+# else
+ cmp __x86_data_cache_size_half, %ecx
+# endif
+# endif
+ jb L(sh_15_no_prefetch)
+
+ lea -64(%ecx), %ecx
+
+ .p2align 4
+L(Shl15LoopStart):
+ prefetcht0 0x1c0(%eax)
+ prefetcht0 0x1c0(%edx)
+ movaps 1(%eax), %xmm2
+ movaps 17(%eax), %xmm3
+ movaps 33(%eax), %xmm4
+ movaps 49(%eax), %xmm5
+ movaps %xmm5, %xmm7
+ palignr $15, %xmm4, %xmm5
+ palignr $15, %xmm3, %xmm4
+ movaps %xmm5, 48(%edx)
+ palignr $15, %xmm2, %xmm3
+ lea 64(%eax), %eax
+ palignr $15, %xmm1, %xmm2
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm7, %xmm1
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ sub $64, %ecx
+ ja L(Shl15LoopStart)
+
+L(Shl15LoopLeave):
+ add $32, %ecx
+ jle L(shl_end_0)
+
+ movaps 1(%eax), %xmm2
+ movaps 17(%eax), %xmm3
+ palignr $15, %xmm2, %xmm3
+ palignr $15, %xmm1, %xmm2
+
+ movaps %xmm2, (%edx)
+ movaps %xmm3, 16(%edx)
+ lea 32(%edx, %ecx), %edx
+ lea 32(%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(sh_15_no_prefetch):
+ lea -32(%ecx), %ecx
lea -15(%eax), %eax
- movaps (%eax), %xmm1
xor %edi, %edi
- lea -32(%ecx), %ecx
- movdqu %xmm0, (%esi)
- POP (%esi)
-L(shl_15_loop):
+ .p2align 4
+L(sh_15_no_prefetch_loop):
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
movdqa 32(%eax, %edi), %xmm3
@@ -1029,8 +1930,7 @@ L(shl_15_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
-
- jb L(shl_15_end)
+ jb L(sh_15_end_no_prefetch_loop)
movdqa 16(%eax, %edi), %xmm2
sub $32, %ecx
@@ -1041,19 +1941,27 @@ L(shl_15_loop):
lea 32(%edi), %edi
movdqa %xmm2, -32(%edx, %edi)
movdqa %xmm3, -16(%edx, %edi)
+ jae L(sh_15_no_prefetch_loop)
- jae L(shl_15_loop)
-
-L(shl_15_end):
+L(sh_15_end_no_prefetch_loop):
lea 32(%ecx), %ecx
add %ecx, %edi
add %edi, %edx
lea 15(%edi, %eax), %eax
- POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY_TAIL(L(table_48bytes_fwd), %ecx, 4)
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
+
+ CFI_PUSH (%edi)
+ .p2align 4
+L(shl_end_0):
+ lea 32(%ecx), %ecx
+ lea (%edx, %ecx), %edx
+ lea (%eax, %ecx), %eax
+ POP (%edi)
+ BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
- ALIGN (4)
+ .p2align 4
L(fwd_write_44bytes):
movq -44(%eax), %xmm0
movq %xmm0, -44(%edx)
@@ -1072,16 +1980,16 @@ L(fwd_write_12bytes):
L(fwd_write_4bytes):
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_40bytes):
movq -40(%eax), %xmm0
movq %xmm0, -40(%edx)
@@ -1098,31 +2006,31 @@ L(fwd_write_8bytes):
movq -8(%eax), %xmm0
movq %xmm0, -8(%edx)
L(fwd_write_0bytes):
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_5bytes):
movl -5(%eax), %ecx
movl -4(%eax), %eax
movl %ecx, -5(%edx)
movl %eax, -4(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_45bytes):
movq -45(%eax), %xmm0
movq %xmm0, -45(%edx)
@@ -1142,16 +2050,16 @@ L(fwd_write_13bytes):
movl %ecx, -5(%edx)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_41bytes):
movq -41(%eax), %xmm0
movq %xmm0, -41(%edx)
@@ -1170,16 +2078,16 @@ L(fwd_write_9bytes):
L(fwd_write_1bytes):
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_46bytes):
movq -46(%eax), %xmm0
movq %xmm0, -46(%edx)
@@ -1200,16 +2108,16 @@ L(fwd_write_6bytes):
movl %ecx, -6(%edx)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_42bytes):
movq -42(%eax), %xmm0
movq %xmm0, -42(%edx)
@@ -1228,16 +2136,16 @@ L(fwd_write_10bytes):
L(fwd_write_2bytes):
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_47bytes):
movq -47(%eax), %xmm0
movq %xmm0, -47(%edx)
@@ -1260,16 +2168,16 @@ L(fwd_write_7bytes):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_43bytes):
movq -43(%eax), %xmm0
movq %xmm0, -43(%edx)
@@ -1290,16 +2198,16 @@ L(fwd_write_3bytes):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_40bytes_align):
movdqa -40(%eax), %xmm0
movdqa %xmm0, -40(%edx)
@@ -1310,47 +2218,47 @@ L(fwd_write_8bytes_align):
movq -8(%eax), %xmm0
movq %xmm0, -8(%edx)
L(fwd_write_0bytes_align):
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_32bytes_align):
movdqa -32(%eax), %xmm0
movdqa %xmm0, -32(%edx)
L(fwd_write_16bytes_align):
movdqa -16(%eax), %xmm0
movdqa %xmm0, -16(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_5bytes_align):
movl -5(%eax), %ecx
movl -4(%eax), %eax
movl %ecx, -5(%edx)
movl %eax, -4(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_45bytes_align):
movdqa -45(%eax), %xmm0
movdqa %xmm0, -45(%edx)
@@ -1364,16 +2272,16 @@ L(fwd_write_13bytes_align):
movl %ecx, -5(%edx)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_37bytes_align):
movdqa -37(%eax), %xmm0
movdqa %xmm0, -37(%edx)
@@ -1384,16 +2292,16 @@ L(fwd_write_21bytes_align):
movl %ecx, -5(%edx)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_41bytes_align):
movdqa -41(%eax), %xmm0
movdqa %xmm0, -41(%edx)
@@ -1406,16 +2314,16 @@ L(fwd_write_9bytes_align):
L(fwd_write_1bytes_align):
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_33bytes_align):
movdqa -33(%eax), %xmm0
movdqa %xmm0, -33(%edx)
@@ -1424,16 +2332,16 @@ L(fwd_write_17bytes_align):
movdqa %xmm0, -17(%edx)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_46bytes_align):
movdqa -46(%eax), %xmm0
movdqa %xmm0, -46(%edx)
@@ -1448,16 +2356,16 @@ L(fwd_write_6bytes_align):
movl %ecx, -6(%edx)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_38bytes_align):
movdqa -38(%eax), %xmm0
movdqa %xmm0, -38(%edx)
@@ -1468,16 +2376,16 @@ L(fwd_write_22bytes_align):
movl %ecx, -6(%edx)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_42bytes_align):
movdqa -42(%eax), %xmm0
movdqa %xmm0, -42(%edx)
@@ -1490,16 +2398,16 @@ L(fwd_write_10bytes_align):
L(fwd_write_2bytes_align):
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_34bytes_align):
movdqa -34(%eax), %xmm0
movdqa %xmm0, -34(%edx)
@@ -1508,16 +2416,16 @@ L(fwd_write_18bytes_align):
movdqa %xmm0, -18(%edx)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_47bytes_align):
movdqa -47(%eax), %xmm0
movdqa %xmm0, -47(%edx)
@@ -1534,16 +2442,16 @@ L(fwd_write_7bytes_align):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_39bytes_align):
movdqa -39(%eax), %xmm0
movdqa %xmm0, -39(%edx)
@@ -1556,16 +2464,16 @@ L(fwd_write_23bytes_align):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_43bytes_align):
movdqa -43(%eax), %xmm0
movdqa %xmm0, -43(%edx)
@@ -1580,16 +2488,16 @@ L(fwd_write_3bytes_align):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_35bytes_align):
movdqa -35(%eax), %xmm0
movdqa %xmm0, -35(%edx)
@@ -1600,16 +2508,16 @@ L(fwd_write_19bytes_align):
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
movb %al, -1(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_44bytes_align):
movdqa -44(%eax), %xmm0
movdqa %xmm0, -44(%edx)
@@ -1622,16 +2530,16 @@ L(fwd_write_12bytes_align):
L(fwd_write_4bytes_align):
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(fwd_write_36bytes_align):
movdqa -36(%eax), %xmm0
movdqa %xmm0, -36(%edx)
@@ -1640,27 +2548,31 @@ L(fwd_write_20bytes_align):
movdqa %xmm0, -20(%edx)
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
-#ifndef USE_AS_BCOPY
-# ifdef USE_AS_MEMPCPY
+# ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
movl %edx, %eax
-# else
+# else
movl DEST(%esp), %eax
+# endif
# endif
-#endif
RETURN_END
- cfi_restore_state
- cfi_remember_state
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(large_page):
movdqu (%eax), %xmm1
+# ifdef USE_AS_MEMMOVE
+ movl DEST+4(%esp), %edi
+ movdqu %xmm0, (%edi)
+# endif
lea 16(%eax), %eax
- movdqu %xmm0, (%esi)
movntdq %xmm1, (%edx)
lea 16(%edx), %edx
- POP (%esi)
lea -0x90(%ecx), %ecx
POP (%edi)
+
+ .p2align 4
L(large_page_loop):
movdqu (%eax), %xmm0
movdqu 0x10(%eax), %xmm1
@@ -1715,8 +2627,7 @@ L(large_page_less_32bytes):
sfence
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
-
- ALIGN (4)
+ .p2align 4
L(bk_write_44bytes):
movq 36(%eax), %xmm0
movq %xmm0, 36(%edx)
@@ -1736,16 +2647,16 @@ L(bk_write_4bytes):
movl (%eax), %ecx
movl %ecx, (%edx)
L(bk_write_0bytes):
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_40bytes):
movq 32(%eax), %xmm0
movq %xmm0, 32(%edx)
@@ -1761,16 +2672,16 @@ L(bk_write_16bytes):
L(bk_write_8bytes):
movq (%eax), %xmm0
movq %xmm0, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_45bytes):
movq 37(%eax), %xmm0
movq %xmm0, 37(%edx)
@@ -1792,16 +2703,16 @@ L(bk_write_5bytes):
L(bk_write_1bytes):
movzbl (%eax), %ecx
movb %cl, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_41bytes):
movq 33(%eax), %xmm0
movq %xmm0, 33(%edx)
@@ -1819,16 +2730,16 @@ L(bk_write_9bytes):
movq %xmm0, 1(%edx)
movzbl (%eax), %ecx
movb %cl, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_46bytes):
movq 38(%eax), %xmm0
movq %xmm0, 38(%edx)
@@ -1849,16 +2760,16 @@ L(bk_write_6bytes):
movl %ecx, 2(%edx)
movzwl (%eax), %ecx
movw %cx, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_42bytes):
movq 34(%eax), %xmm0
movq %xmm0, 34(%edx)
@@ -1877,16 +2788,16 @@ L(bk_write_10bytes):
L(bk_write_2bytes):
movzwl (%eax), %ecx
movw %cx, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_47bytes):
movq 39(%eax), %xmm0
movq %xmm0, 39(%edx)
@@ -1909,16 +2820,16 @@ L(bk_write_7bytes):
movw %cx, 1(%edx)
movzbl (%eax), %eax
movb %al, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN
- ALIGN (4)
+ .p2align 4
L(bk_write_43bytes):
movq 35(%eax), %xmm0
movq %xmm0, 35(%edx)
@@ -1939,18 +2850,18 @@ L(bk_write_3bytes):
movw %cx, 1(%edx)
movzbl (%eax), %eax
movb %al, (%edx)
-#ifndef USE_AS_BCOPY
+# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
-# ifdef USE_AS_MEMPCPY
+# ifdef USE_AS_MEMPCPY
movl LEN(%esp), %ecx
add %ecx, %eax
+# endif
# endif
-#endif
RETURN_END
.pushsection .rodata.ssse3,"a",@progbits
- ALIGN (2)
+ .p2align 2
L(table_48bytes_fwd):
.int JMPTBL (L(fwd_write_0bytes), L(table_48bytes_fwd))
.int JMPTBL (L(fwd_write_1bytes), L(table_48bytes_fwd))
@@ -2001,7 +2912,7 @@ L(table_48bytes_fwd):
.int JMPTBL (L(fwd_write_46bytes), L(table_48bytes_fwd))
.int JMPTBL (L(fwd_write_47bytes), L(table_48bytes_fwd))
- ALIGN (2)
+ .p2align 2
L(table_48bytes_fwd_align):
.int JMPTBL (L(fwd_write_0bytes_align), L(table_48bytes_fwd_align))
.int JMPTBL (L(fwd_write_1bytes_align), L(table_48bytes_fwd_align))
@@ -2052,7 +2963,7 @@ L(table_48bytes_fwd_align):
.int JMPTBL (L(fwd_write_46bytes_align), L(table_48bytes_fwd_align))
.int JMPTBL (L(fwd_write_47bytes_align), L(table_48bytes_fwd_align))
- ALIGN (2)
+ .p2align 2
L(shl_table):
.int JMPTBL (L(shl_0), L(shl_table))
.int JMPTBL (L(shl_1), L(shl_table))
@@ -2071,7 +2982,7 @@ L(shl_table):
.int JMPTBL (L(shl_14), L(shl_table))
.int JMPTBL (L(shl_15), L(shl_table))
- ALIGN (2)
+ .p2align 2
L(table_48_bytes_bwd):
.int JMPTBL (L(bk_write_0bytes), L(table_48_bytes_bwd))
.int JMPTBL (L(bk_write_1bytes), L(table_48_bytes_bwd))
@@ -2124,13 +3035,13 @@ L(table_48_bytes_bwd):
.popsection
-#ifdef USE_AS_MEMMOVE
- ALIGN (4)
+# ifdef USE_AS_MEMMOVE
+ .p2align 4
L(copy_backward):
- PUSH (%esi)
- movl %eax, %esi
+ PUSH (%edi)
+ movl %eax, %edi
lea (%ecx,%edx,1),%edx
- lea (%ecx,%esi,1),%esi
+ lea (%ecx,%edi,1),%edi
testl $0x3, %edx
jnz L(bk_align)
@@ -2145,52 +3056,53 @@ L(bk_write_64bytesless):
L(bk_write_more32bytes):
/* Copy 32 bytes at a time. */
sub $32, %ecx
- movq -8(%esi), %xmm0
+ movq -8(%edi), %xmm0
movq %xmm0, -8(%edx)
- movq -16(%esi), %xmm0
+ movq -16(%edi), %xmm0
movq %xmm0, -16(%edx)
- movq -24(%esi), %xmm0
+ movq -24(%edi), %xmm0
movq %xmm0, -24(%edx)
- movq -32(%esi), %xmm0
+ movq -32(%edi), %xmm0
movq %xmm0, -32(%edx)
sub $32, %edx
- sub $32, %esi
+ sub $32, %edi
L(bk_write_less32bytes):
- movl %esi, %eax
+ movl %edi, %eax
sub %ecx, %edx
sub %ecx, %eax
- POP (%esi)
+ POP (%edi)
L(bk_write_less32bytes_2):
BRANCH_TO_JMPTBL_ENTRY (L(table_48_bytes_bwd), %ecx, 4)
- CFI_PUSH (%esi)
- ALIGN (4)
+ CFI_PUSH (%edi)
+
+ .p2align 4
L(bk_align):
cmp $8, %ecx
jbe L(bk_write_less32bytes)
testl $1, %edx
/* We get here only if (EDX & 3 ) != 0 so if (EDX & 1) ==0,
- then (EDX & 2) must be != 0. */
+ then (EDX & 2) must be != 0. */
jz L(bk_got2)
- sub $1, %esi
+ sub $1, %edi
sub $1, %ecx
sub $1, %edx
- movzbl (%esi), %eax
+ movzbl (%edi), %eax
movb %al, (%edx)
testl $2, %edx
jz L(bk_aligned_4)
L(bk_got2):
- sub $2, %esi
+ sub $2, %edi
sub $2, %ecx
sub $2, %edx
- movzwl (%esi), %eax
+ movzwl (%edi), %eax
movw %ax, (%edx)
jmp L(bk_aligned_4)
- ALIGN (4)
+ .p2align 4
L(bk_write_more64bytes):
/* Check alignment of last byte. */
testl $15, %edx
@@ -2198,51 +3110,52 @@ L(bk_write_more64bytes):
/* EDX is aligned 4 bytes, but not 16 bytes. */
L(bk_ssse3_align):
- sub $4, %esi
+ sub $4, %edi
sub $4, %ecx
sub $4, %edx
- movl (%esi), %eax
+ movl (%edi), %eax
movl %eax, (%edx)
testl $15, %edx
jz L(bk_ssse3_cpy_pre)
- sub $4, %esi
+ sub $4, %edi
sub $4, %ecx
sub $4, %edx
- movl (%esi), %eax
+ movl (%edi), %eax
movl %eax, (%edx)
testl $15, %edx
jz L(bk_ssse3_cpy_pre)
- sub $4, %esi
+ sub $4, %edi
sub $4, %ecx
sub $4, %edx
- movl (%esi), %eax
+ movl (%edi), %eax
movl %eax, (%edx)
L(bk_ssse3_cpy_pre):
cmp $64, %ecx
jb L(bk_write_more32bytes)
+ .p2align 4
L(bk_ssse3_cpy):
- sub $64, %esi
+ sub $64, %edi
sub $64, %ecx
sub $64, %edx
- movdqu 0x30(%esi), %xmm3
+ movdqu 0x30(%edi), %xmm3
movdqa %xmm3, 0x30(%edx)
- movdqu 0x20(%esi), %xmm2
+ movdqu 0x20(%edi), %xmm2
movdqa %xmm2, 0x20(%edx)
- movdqu 0x10(%esi), %xmm1
+ movdqu 0x10(%edi), %xmm1
movdqa %xmm1, 0x10(%edx)
- movdqu (%esi), %xmm0
+ movdqu (%edi), %xmm0
movdqa %xmm0, (%edx)
cmp $64, %ecx
jae L(bk_ssse3_cpy)
jmp L(bk_write_64bytesless)
-#endif
+# endif
END (MEMCPY)
diff --git a/libc/sysdeps/i386/init-first.c b/libc/sysdeps/i386/init-first.c
index 2f807760a..c2eaccd01 100644
--- a/libc/sysdeps/i386/init-first.c
+++ b/libc/sysdeps/i386/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For i386/Unix.
- Copyright (C) 1995,1996,1997,2000,2001,2002 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
@@ -16,6 +16,7 @@
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 **);
@@ -40,6 +41,9 @@ init (int *data)
/* 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
diff --git a/libc/sysdeps/ieee754/dbl-64/s_ilogb.c b/libc/sysdeps/ieee754/dbl-64/e_ilogb.c
index 05c66d70f..0452a71fb 100644
--- a/libc/sysdeps/ieee754/dbl-64/s_ilogb.c
+++ b/libc/sysdeps/ieee754/dbl-64/e_ilogb.c
@@ -25,7 +25,7 @@ static char rcsid[] = "$NetBSD: s_ilogb.c,v 1.9 1995/05/10 20:47:28 jtc Exp $";
#include <math.h>
#include <math_private.h>
-int __ilogb(double x)
+int __ieee754_ilogb(double x)
{
int32_t hx,lx,ix;
@@ -52,8 +52,3 @@ int __ilogb(double x)
}
return FP_ILOGBNAN;
}
-weak_alias (__ilogb, ilogb)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ilogb, __ilogbl)
-weak_alias (__ilogb, ilogbl)
-#endif
diff --git a/libc/sysdeps/ieee754/dbl-64/e_pow.c b/libc/sysdeps/ieee754/dbl-64/e_pow.c
index 26ffaaddc..6c41af93b 100644
--- a/libc/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/libc/sysdeps/ieee754/dbl-64/e_pow.c
@@ -47,6 +47,7 @@
# define SECTION
#endif
+static const double huge = 1.0e300, tiny = 1.0e-300;
double __exp1(double x, double xx, double error);
static double log1(double x, double *delta, double *error);
@@ -156,8 +157,8 @@ __ieee754_pow(double x, double y) {
if (qy > 0x45f00000 && qy < 0x7ff00000) {
if (x == 1.0) return 1.0;
- if (y>0) return (x>1.0)?INF.x:0;
- if (y<0) return (x<1.0)?INF.x:0;
+ if (y>0) return (x>1.0)?huge*huge:tiny*tiny;
+ if (y<0) return (x<1.0)?huge*huge:tiny*tiny;
}
if (x == 1.0) return 1.0;
diff --git a/libc/sysdeps/ieee754/dbl-64/w_exp.c b/libc/sysdeps/ieee754/dbl-64/w_exp.c
index b584ed83d..aa8ff7689 100644
--- a/libc/sysdeps/ieee754/dbl-64/w_exp.c
+++ b/libc/sysdeps/ieee754/dbl-64/w_exp.c
@@ -31,12 +31,12 @@ __exp (double x)
if (__builtin_expect (isgreater (x, o_threshold), 0))
{
if (_LIB_VERSION != _IEEE_)
- return __kernel_standard_f (x, x, 6);
+ return __kernel_standard (x, x, 6);
}
else if (__builtin_expect (isless (x, u_threshold), 0))
{
if (_LIB_VERSION != _IEEE_)
- return __kernel_standard_f (x, x, 7);
+ return __kernel_standard (x, x, 7);
}
return __ieee754_exp (x);
diff --git a/libc/sysdeps/ieee754/flt-32/s_ilogbf.c b/libc/sysdeps/ieee754/flt-32/e_ilogbf.c
index 21f9cd970..1ae344ea3 100644
--- a/libc/sysdeps/ieee754/flt-32/s_ilogbf.c
+++ b/libc/sysdeps/ieee754/flt-32/e_ilogbf.c
@@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: s_ilogbf.c,v 1.4 1995/05/10 20:47:31 jtc Exp $";
#include <math.h>
#include <math_private.h>
-int __ilogbf(float x)
+int __ieee754_ilogbf(float x)
{
int32_t hx,ix;
@@ -42,4 +42,3 @@ int __ilogbf(float x)
}
return FP_ILOGBNAN;
}
-weak_alias (__ilogbf, ilogbf)
diff --git a/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c b/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c
index d52eb050d..0a476492d 100644
--- a/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c
+++ b/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c
@@ -28,7 +28,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-int __ilogbl(long double x)
+int __ieee754_ilogbl (long double x)
{
int64_t hx,lx;
int ix;
@@ -54,4 +54,3 @@ int __ilogbl(long double x)
}
return FP_ILOGBNAN;
}
-weak_alias (__ilogbl, ilogbl)
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c b/libc/sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c
index a6f0e1e67..55f87ed42 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c
@@ -29,7 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <math_ldbl_opt.h>
-int __ilogbl(long double x)
+int __ieee754_ilogbl(long double x)
{
int64_t hx,lx;
int ix;
@@ -55,4 +55,3 @@ int __ilogbl(long double x)
}
return FP_ILOGBNAN;
}
-long_double_symbol (libm, __ilogbl, ilogbl);
diff --git a/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c b/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c
new file mode 100644
index 000000000..75a38e13c
--- /dev/null
+++ b/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c
@@ -0,0 +1,2 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/ldbl-128/e_ilogbl.c>
diff --git a/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c b/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c
index 753459994..0c7d9d544 100644
--- a/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c
+++ b/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c
@@ -29,7 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-int __ilogbl(long double x)
+int __ieee754_ilogbl (long double x)
{
int32_t es,hx,lx,ix;
@@ -57,4 +57,3 @@ int __ilogbl(long double x)
}
return FP_ILOGBNAN;
}
-weak_alias (__ilogbl, ilogbl)
diff --git a/libc/sysdeps/ieee754/ldbl-opt/s_ilogb.c b/libc/sysdeps/ieee754/ldbl-opt/w_ilogb.c
index 3a6ccbd09..f518087a5 100644
--- a/libc/sysdeps/ieee754/ldbl-opt/s_ilogb.c
+++ b/libc/sysdeps/ieee754/ldbl-opt/w_ilogb.c
@@ -1,5 +1,5 @@
#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_ilogb.c>
+#include <math/w_ilogb.c>
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
compat_symbol (libm, __ilogb, ilogbl, GLIBC_2_0);
#endif
diff --git a/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c b/libc/sysdeps/ieee754/ldbl-opt/w_ilogbl.c
index bb8808240..36f83f6ad 100644
--- a/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c
+++ b/libc/sysdeps/ieee754/ldbl-opt/w_ilogbl.c
@@ -1,5 +1,5 @@
#include <math_ldbl_opt.h>
#undef weak_alias
#define weak_alias(n,a)
-#include <sysdeps/ieee754/ldbl-128/s_ilogbl.c>
+#include <math/w_ilogbl.c>
long_double_symbol (libm, __ilogbl, ilogbl);
diff --git a/libc/sysdeps/mach/hurd/bits/typesizes.h b/libc/sysdeps/mach/hurd/bits/typesizes.h
index 7bde5d5ec..bca63ed92 100644
--- a/libc/sysdeps/mach/hurd/bits/typesizes.h
+++ b/libc/sysdeps/mach/hurd/bits/typesizes.h
@@ -57,6 +57,7 @@
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE __UQUAD_TYPE
#define __SSIZE_T_TYPE __SWORD_TYPE
+#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 256
diff --git a/libc/sysdeps/mach/hurd/i386/init-first.c b/libc/sysdeps/mach/hurd/i386/init-first.c
index 7a10e7857..4785e8dbe 100644
--- a/libc/sysdeps/mach/hurd/i386/init-first.c
+++ b/libc/sysdeps/mach/hurd/i386/init-first.c
@@ -1,6 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For i386/Hurd.
- Copyright (C) 1995,96,97,98,99,2000,01,02,03,04,05
- 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
@@ -18,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <assert.h>
+#include <ctype.h>
#include <hurd.h>
#include <stdio.h>
#include <unistd.h>
@@ -91,6 +91,9 @@ posixland_init (int argc, char **argv, char **envp)
__getopt_clean_environment (envp);
#endif
+ /* Initialize ctype data. */
+ __ctype_init ();
+
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
diff --git a/libc/sysdeps/mach/hurd/powerpc/init-first.c b/libc/sysdeps/mach/hurd/powerpc/init-first.c
index 6629a04bc..9531b5a6e 100644
--- a/libc/sysdeps/mach/hurd/powerpc/init-first.c
+++ b/libc/sysdeps/mach/hurd/powerpc/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. PowerPC/Hurd.
- Copyright (C) 1995-2001, 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
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <assert.h>
+#include <ctype.h>
#include <hurd.h>
#include <stdio.h>
#include <unistd.h>
@@ -81,6 +82,9 @@ posixland_init (int argc, char **argv, char **envp)
__getopt_clean_environment (__environ);
#endif
+ /* Initialize ctype data. */
+ __ctype_init ();
+
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
diff --git a/libc/sysdeps/mach/hurd/ttyname_r.c b/libc/sysdeps/mach/hurd/ttyname_r.c
index 1408ccb3f..5e5c054e9 100644
--- a/libc/sysdeps/mach/hurd/ttyname_r.c
+++ b/libc/sysdeps/mach/hurd/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,1995,1996,1998,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
@@ -42,7 +42,7 @@ __ttyname_r (int fd, char *buf, size_t buflen)
len = strlen (nodename) + 1;
if (len > buflen)
{
- errno = EINVAL;
+ errno = ERANGE;
return errno;
}
diff --git a/libc/sysdeps/mach/i386/machine-lock.h b/libc/sysdeps/mach/i386/machine-lock.h
index e62f53bb8..1f110e2d8 100644
--- a/libc/sysdeps/mach/i386/machine-lock.h
+++ b/libc/sysdeps/mach/i386/machine-lock.h
@@ -1,5 +1,5 @@
/* Machine-specific definition for spin locks. i386 version.
- Copyright (C) 1994,1997,2007,2008 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,7 +21,7 @@
/* The type of a spin lock variable. */
-typedef __volatile int __spin_lock_t;
+typedef volatile int __spin_lock_t;
/* Value to initialize `__spin_lock_t' variables to. */
diff --git a/libc/sysdeps/mach/powerpc/machine-lock.h b/libc/sysdeps/mach/powerpc/machine-lock.h
index 33b793df7..84159c5a5 100644
--- a/libc/sysdeps/mach/powerpc/machine-lock.h
+++ b/libc/sysdeps/mach/powerpc/machine-lock.h
@@ -1,5 +1,5 @@
/* Machine-specific definition for spin locks. PowerPC version.
- Copyright (C) 1994,97,2002,2007 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,7 +21,7 @@
/* The type of a spin lock variable. */
-typedef __volatile long int __spin_lock_t;
+typedef volatile long int __spin_lock_t;
/* Value to initialize `__spin_lock_t' variables to. */
diff --git a/libc/sysdeps/powerpc/memmove.c b/libc/sysdeps/powerpc/memmove.c
new file mode 100644
index 000000000..4887ae356
--- /dev/null
+++ b/libc/sysdeps/powerpc/memmove.c
@@ -0,0 +1,119 @@
+/* Copy memory to memory until the specified number of bytes
+ has been copied. Overlap is handled correctly.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+#include <memcopy.h>
+#include <pagecopy.h>
+
+/* All this is so that bcopy.c can #include
+ this file after defining some things. */
+#ifndef a1
+#define a1 dest /* First arg is DEST. */
+#define a1const
+#define a2 src /* Second arg is SRC. */
+#define a2const const
+#undef memmove
+#endif
+#if !defined(RETURN) || !defined(rettype)
+#define RETURN(s) return (s) /* Return DEST. */
+#define rettype void *
+#endif
+
+#ifndef MEMMOVE
+#define MEMMOVE memmove
+#endif
+
+rettype
+MEMMOVE (a1, a2, len)
+ a1const void *a1;
+ a2const void *a2;
+ size_t len;
+{
+ unsigned long int dstp = (long int) dest;
+ unsigned long int srcp = (long int) src;
+
+ /* If there is no overlap between ranges, call the builtin memcpy. */
+ if ( (dstp >= (srcp + len)) || (srcp > (dstp + len)) )
+ return __builtin_memcpy (dest, src, len);
+
+ /* This test makes the forward copying code be used whenever possible.
+ Reduces the working set. */
+ if (dstp - srcp >= len) /* *Unsigned* compare! */
+ {
+ /* Copy from the beginning to the end. */
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= (-dstp) % OPSIZ;
+ BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ);
+
+ /* Copy whole pages from SRCP to DSTP by virtual address
+ manipulation, as much as possible. */
+
+ PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_FWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_FWD (dstp, srcp, len);
+ }
+ else
+ {
+ /* Copy from the end to the beginning. */
+ srcp += len;
+ dstp += len;
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= dstp % OPSIZ;
+ BYTE_COPY_BWD (dstp, srcp, dstp % OPSIZ);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_BWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_BWD (dstp, srcp, len);
+ }
+
+ RETURN (dest);
+}
+#ifndef memmove
+libc_hidden_builtin_def (memmove)
+#endif
diff --git a/libc/sysdeps/powerpc/powerpc32/dl-machine.h b/libc/sysdeps/powerpc/powerpc32/dl-machine.h
index b3177d159..45868f5de 100644
--- a/libc/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/libc/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -388,8 +388,4 @@ elf_machine_lazy_rel (struct link_map *map,
/* elf_machine_runtime_setup handles this. */
}
-/* The SVR4 ABI specifies that the JMPREL relocs must be inside the
- DT_RELA table. */
-#define ELF_MACHINE_PLTREL_OVERLAP 1
-
#endif /* RESOLVE_MAP */
diff --git a/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c b/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c
index 2594b1d57..698b82f4f 100644
--- a/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c
+++ b/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c
@@ -1,5 +1,5 @@
/* _memcopy.c -- subroutines for memory copy functions.
- Copyright (C) 1991, 1996, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
Updated for POWER6 by Steven Munroe (sjmunroe@us.ibm.com).
@@ -65,6 +65,20 @@ _wordcopy_fwd_aligned (dstp, srcp, len)
DSTP should be aligned for memory operations on `op_t's, but SRCP must
*not* be aligned. */
+#define fwd_align_merge(align) \
+ do \
+ { \
+ a1 = ((op_t *) srcp)[1]; \
+ a2 = ((op_t *) srcp)[2]; \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (32-align*8)); \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (32-align*8)); \
+ a0 = a2; \
+ srcp += 2 * OPSIZ; \
+ dstp += 2 * OPSIZ; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
void
_wordcopy_fwd_dest_aligned (dstp, srcp, len)
long int dstp;
@@ -101,54 +115,7 @@ _wordcopy_fwd_dest_aligned (dstp, srcp, len)
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ fwd_align_merge (align);
}
@@ -191,6 +158,20 @@ _wordcopy_bwd_aligned (dstp, srcp, len)
while (len != 0);
}
+#define bwd_align_merge(align) \
+ do \
+ { \
+ srcp -= 2 * OPSIZ; \
+ dstp -= 2 * OPSIZ; \
+ a1 = ((op_t *) srcp)[1]; \
+ a0 = ((op_t *) srcp)[0]; \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (32-align*8)); \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (32-align*8)); \
+ a2 = a0; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
before SRCP to block finishing right before DSTP with LEN `op_t'
words (not LEN bytes!). DSTP should be aligned for memory
@@ -232,55 +213,5 @@ _wordcopy_bwd_dest_aligned (dstp, srcp, len)
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ bwd_align_merge (align);
}
diff --git a/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c b/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c
index 184904db5..4c72404e3 100644
--- a/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c
+++ b/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c
@@ -1,5 +1,5 @@
/* _memcopy.c -- subroutines for memory copy functions.
- Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -59,6 +59,21 @@ _wordcopy_fwd_aligned (dstp, srcp, len)
while (len != 0);
}
+#define fwd_align_merge(align) \
+ do \
+ { \
+ a1 = ((op_t *) srcp)[1]; \
+ a2 = ((op_t *) srcp)[2]; \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (64-align*8)); \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (64-align*8)); \
+ a0 = a2; \
+ srcp += 2 * OPSIZ; \
+ dstp += 2 * OPSIZ; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
+
/* _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
DSTP should be aligned for memory operations on `op_t's, but SRCP must
@@ -100,114 +115,7 @@ _wordcopy_fwd_dest_aligned (dstp, srcp, len)
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 4:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
- ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 5:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
- ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 6:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
- ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 7:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
- ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ fwd_align_merge (align);
}
@@ -250,6 +158,20 @@ _wordcopy_bwd_aligned (dstp, srcp, len)
while (len != 0);
}
+#define bwd_align_merge(align) \
+ do \
+ { \
+ srcp -= 2 * OPSIZ; \
+ dstp -= 2 * OPSIZ; \
+ a1 = ((op_t *) srcp)[1]; \
+ a0 = ((op_t *) srcp)[0]; \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (64-align*8)); \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (64-align*8)); \
+ a2 = a0; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
before SRCP to block finishing right before DSTP with LEN `op_t'
words (not LEN bytes!). DSTP should be aligned for memory
@@ -291,119 +213,5 @@ _wordcopy_bwd_dest_aligned (dstp, srcp, len)
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 4:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
- ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 5:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
- ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 6:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
- ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 7:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
- ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ bwd_align_merge (align);
}
diff --git a/libc/sysdeps/s390/bits/byteswap-16.h b/libc/sysdeps/s390/bits/byteswap-16.h
new file mode 100644
index 000000000..8bfec78ff
--- /dev/null
+++ b/libc/sysdeps/s390/bits/byteswap-16.h
@@ -0,0 +1,65 @@
+/* Macros to swap the order of bytes in 16-bit integer values. s390 version
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+ 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_BYTESWAP_H
+# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+/* Swap bytes in 16 bit value. */
+#if defined __GNUC__ && __GNUC__ >= 2
+# if __WORDSIZE == 64
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned short int __v, __x = (x); \
+ if (__builtin_constant_p (x)) \
+ __v = __bswap_constant_16 (__x); \
+ else { \
+ unsigned short int __tmp = (unsigned short int) (__x); \
+ __asm__ __volatile__ ( \
+ "lrvh %0,%1" \
+ : "=&d" (__v) : "m" (__tmp) ); \
+ } \
+ __v; }))
+# else
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned short int __v, __x = (x); \
+ if (__builtin_constant_p (x)) \
+ __v = __bswap_constant_16 (__x); \
+ else { \
+ unsigned short int __tmp = (unsigned short int) (__x); \
+ __asm__ __volatile__ ( \
+ "sr %0,%0\n" \
+ "la 1,%1\n" \
+ "icm %0,2,1(1)\n" \
+ "ic %0,0(1)" \
+ : "=&d" (__v) : "m" (__tmp) : "1"); \
+ } \
+ __v; }))
+# endif
+#else
+/* This is better than nothing. */
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
+#endif
diff --git a/libc/sysdeps/s390/bits/byteswap.h b/libc/sysdeps/s390/bits/byteswap.h
index ac325b0e4..e91d4ccb8 100644
--- a/libc/sysdeps/s390/bits/byteswap.h
+++ b/libc/sysdeps/s390/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. s390 version.
- Copyright (C) 2000-2003, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2008, 2011, 2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -29,46 +29,8 @@
#define __bswap_constant_16(x) \
((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
-/* Swap bytes in 16 bit value. */
-#if defined __GNUC__ && __GNUC__ >= 2
-# if __WORDSIZE == 64
-# define __bswap_16(x) \
- (__extension__ \
- ({ unsigned short int __v, __x = (x); \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_16 (__x); \
- else { \
- unsigned short int __tmp = (unsigned short int) (__x); \
- __asm__ __volatile__ ( \
- "lrvh %0,%1" \
- : "=&d" (__v) : "m" (__tmp) ); \
- } \
- __v; }))
-# else
-# define __bswap_16(x) \
- (__extension__ \
- ({ unsigned short int __v, __x = (x); \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_16 (__x); \
- else { \
- unsigned short int __tmp = (unsigned short int) (__x); \
- __asm__ __volatile__ ( \
- "sr %0,%0\n" \
- "la 1,%1\n" \
- "icm %0,2,1(1)\n" \
- "ic %0,0(1)" \
- : "=&d" (__v) : "m" (__tmp) : "1"); \
- } \
- __v; }))
-# endif
-#else
-/* This is better than nothing. */
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
- return __bswap_constant_16 (__bsx);
-}
-#endif
+/* Get __bswap_16. */
+#include <bits/byteswap-16.h>
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
@@ -150,16 +112,16 @@ __bswap_32 (unsigned int __bsx)
__r.__l[1] = __bswap_32 (__w.__l[0]); \
__r.__ll; })
# endif
-#else
+#elif __GLIBC_HAVE_LONG_LONG
# define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ul) >> 56) \
- | (((x) & 0x00ff000000000000ul) >> 40) \
- | (((x) & 0x0000ff0000000000ul) >> 24) \
- | (((x) & 0x000000ff00000000ul) >> 8) \
- | (((x) & 0x00000000ff000000ul) << 8) \
- | (((x) & 0x0000000000ff0000ul) << 24) \
- | (((x) & 0x000000000000ff00ul) << 40) \
- | (((x) & 0x00000000000000fful) << 56))
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
static __inline unsigned long long int
__bswap_64 (unsigned long long int __bsx)
diff --git a/libc/sysdeps/s390/s390-32/dl-machine.h b/libc/sysdeps/s390/s390-32/dl-machine.h
index 58bd3aba9..3eb7e4115 100644
--- a/libc/sysdeps/s390/s390-32/dl-machine.h
+++ b/libc/sysdeps/s390/s390-32/dl-machine.h
@@ -227,9 +227,6 @@ _dl_start_user:\n\
/* The S390 never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-/* The S390 overlaps DT_RELA and DT_PLTREL. */
-#define ELF_MACHINE_PLTREL_OVERLAP 1
-
/* We define an initialization functions. This is called very early in
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
diff --git a/libc/sysdeps/sh/init-first.c b/libc/sysdeps/sh/init-first.c
index 08ae8a3de..c2e45e428 100644
--- a/libc/sysdeps/sh/init-first.c
+++ b/libc/sysdeps/sh/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For SH.
- Copyright (C) 1995-1998, 2000, 2001, 2002 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
@@ -16,6 +16,7 @@
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 **);
@@ -40,6 +41,9 @@ init (int *data)
/* 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
diff --git a/libc/sysdeps/unix/sysv/tcgetpgrp.c b/libc/sysdeps/sh/sh4/fpu/fedisblxcpt.c
index 674d32e47..029fcc386 100644
--- a/libc/sysdeps/unix/sysv/tcgetpgrp.c
+++ b/libc/sysdeps/sh/sh4/fpu/fedisblxcpt.c
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992, 1997, 2002 Free Software Foundation, Inc.
+/* Disable floating-point exceptions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -15,21 +17,23 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <termios.h>
-#include <sysv_termio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-
-/* Return the foreground process group ID of FD. */
-pid_t
-tcgetpgrp (fd)
- int fd;
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fedisableexcept (int excepts)
{
- int pgrp;
- if (__ioctl (fd, _TIOCGPGRP, &pgrp) < 0)
- return (pid_t) -1;
- return (pid_t) pgrp;
+ unsigned int temp, old_exc;
+
+ /* Get the current control register contents. */
+ _FPU_GETCW (temp);
+
+ old_exc = (temp >> 5) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ temp &= ~(excepts << 5);
+ _FPU_SETCW (temp);
+
+ return old_exc;
}
-libc_hidden_def (tcgetpgrp)
diff --git a/libc/sysdeps/unix/sysv/tcsetpgrp.c b/libc/sysdeps/sh/sh4/fpu/feenablxcpt.c
index 154976467..93fa7498e 100644
--- a/libc/sysdeps/unix/sysv/tcsetpgrp.c
+++ b/libc/sysdeps/sh/sh4/fpu/feenablxcpt.c
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+/* Enable floating-point exceptions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -15,17 +17,22 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sys/types.h>
-#include <sysv_termio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
+#include <fenv.h>
+#include <fpu_control.h>
-/* Set the foreground process group ID of FD set PGRP_ID. */
int
-tcsetpgrp (fd, pgrp_id)
- int fd;
- pid_t pgrp_id;
+feenableexcept (int excepts)
{
- return __ioctl (fd, _TIOCSPGRP, &pgrp_id);
+ unsigned int temp, old_flag;
+
+ /* Get current exceptions. */
+ _FPU_GETCW (temp);
+
+ old_flag = (temp >> 5) & FE_ALL_EXCEPT;
+ excepts &= FE_ALL_EXCEPT;
+
+ temp |= excepts << 5;
+ _FPU_SETCW (temp);
+
+ return old_flag;
}
diff --git a/libc/sysdeps/sh/sh4/fpu/fegetenv.c b/libc/sysdeps/sh/sh4/fpu/fegetenv.c
index 68687dc2d..3103316e3 100644
--- a/libc/sysdeps/sh/sh4/fpu/fegetenv.c
+++ b/libc/sysdeps/sh/sh4/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 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,6 +24,10 @@ fegetenv (fenv_t *envp)
{
unsigned long int temp;
_FPU_GETCW (temp);
+ /* When read fpscr, this was initialized.
+ We need to rewrite value of temp. */
+ _FPU_SETCW (temp);
+
envp->__fpscr = temp;
return 0;
diff --git a/libc/sysdeps/unix/sysv/tcdrain.c b/libc/sysdeps/sh/sh4/fpu/fegetexcept.c
index 229965dbe..a849a1775 100644
--- a/libc/sysdeps/unix/sysv/tcdrain.c
+++ b/libc/sysdeps/sh/sh4/fpu/fegetexcept.c
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -15,18 +17,19 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sysv_termio.h>
-#include <sys/ioctl.h>
+#include <fenv.h>
+#include <fpu_control.h>
-/* Wait for pending output to be written on FD. */
int
-__libc_tcdrain (int fd)
+fegetexcept (void)
{
- /* With an argument of 1, TCSBRK just waits for output to drain. */
- return __ioctl (fd, _TCSBRK, 1);
+ unsigned int temp;
+
+ /* Get current exceptions. */
+ _FPU_GETCW (temp);
+ /* When read fpscr, this was initialized.
+ We need to rewrite value of temp. */
+ _FPU_SETCW (temp);
+
+ return (temp >> 5) & FE_ALL_EXCEPT;
}
-weak_alias (__libc_tcdrain, tcdrain)
diff --git a/libc/sysdeps/sh/sh4/fpu/fesetround.c b/libc/sysdeps/sh/sh4/fpu/fesetround.c
index 5df96d2d0..3269199ea 100644
--- a/libc/sysdeps/sh/sh4/fpu/fesetround.c
+++ b/libc/sysdeps/sh/sh4/fpu/fesetround.c
@@ -1,5 +1,5 @@
/* Set current rounding direction.
- Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000, 2005, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -27,7 +27,7 @@ fesetround (int round)
if ((round & ~0x3) != 0)
/* ROUND is no valid rounding mode. */
- return 0;
+ return 1;
/* Get current state. */
_FPU_GETCW (cw);
@@ -38,6 +38,6 @@ fesetround (int round)
/* Set new state. */
_FPU_SETCW (cw);
- return 1;
+ return 0;
}
libm_hidden_def (fesetround)
diff --git a/libc/sysdeps/unix/sysv/tcflush.c b/libc/sysdeps/sh/sh4/fpu/feupdateenv.c
index 9051911bc..96a697914 100644
--- a/libc/sysdeps/unix/sysv/tcflush.c
+++ b/libc/sysdeps/sh/sh4/fpu/feupdateenv.c
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -15,30 +17,23 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
+#include <fenv.h>
+#include <fpu_control.h>
-#include <sysv_termio.h>
-
-/* Flush pending data on FD. */
int
-tcflush (fd, queue_selector)
- int fd;
- int queue_selector;
+feupdateenv (const fenv_t *envp)
{
- switch (queue_selector)
- {
- case TCIFLUSH:
- return __ioctl (fd, _TCFLSH, 0);
- case TCOFLUSH:
- return __ioctl (fd, _TCFLSH, 1);
- case TCIOFLUSH:
- return __ioctl (fd, _TCFLSH, 2);
- default:
- __set_errno (EINVAL);
- return -1;
- }
+ unsigned int temp;
+
+ _FPU_GETCW (temp);
+ temp = (temp & FE_ALL_EXCEPT);
+
+ /* Raise the saved exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ fesetenv (envp);
+ feraiseexcept ((int) temp);
+
+ return 0;
}
+libm_hidden_def (feupdateenv)
diff --git a/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c
index 0bed3a529..a555b1088 100644
--- a/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c
+++ b/libc/sysdeps/sh/sh4/fpu/fraiseexcpt.c
@@ -1,6 +1,7 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,18 +18,47 @@
<http://www.gnu.org/licenses/>. */
#include <fenv.h>
+#include <float.h>
#include <fpu_control.h>
#include <math.h>
int
feraiseexcept (int excepts)
{
+ if (excepts == 0)
+ return 0;
+
/* Raise exceptions represented by EXPECTS. */
- fexcept_t temp;
- _FPU_GETCW (temp);
- temp |= (excepts & FE_ALL_EXCEPT);
- temp |= (excepts & FE_ALL_EXCEPT) << 5;
- _FPU_SETCW (temp);
+
+ if (excepts & FE_INEXACT)
+ {
+ double d = 1.0, x = 3.0;
+ __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
+ }
+
+ if (excepts & FE_UNDERFLOW)
+ {
+ long double d = LDBL_MIN, x = 10;
+ __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
+ }
+
+ if (excepts & FE_OVERFLOW)
+ {
+ long double d = LDBL_MAX;
+ __asm__ __volatile__ ("fmul %0, %0" : "+d" (d) : "d" (d));
+ }
+
+ if (excepts & FE_DIVBYZERO)
+ {
+ double d = 1.0, x = 0.0;
+ __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
+ }
+
+ if (excepts & FE_INVALID)
+ {
+ double d = HUGE_VAL, x = 0.0;
+ __asm__ __volatile__ ("fmul %1, %0" : "+d" (d) : "d" (x));
+ }
return 0;
}
diff --git a/libc/sysdeps/sh/sh4/fpu/ftestexcept.c b/libc/sysdeps/sh/sh4/fpu/ftestexcept.c
index 9e0bfc5c2..c2e1772a9 100644
--- a/libc/sysdeps/sh/sh4/fpu/ftestexcept.c
+++ b/libc/sysdeps/sh/sh4/fpu/ftestexcept.c
@@ -26,6 +26,9 @@ fetestexcept (int excepts)
/* Get current exceptions. */
_FPU_GETCW (temp);
+ /* When read fpscr, this was initialized.
+ We need to rewrite value of temp. */
+ _FPU_SETCW (temp);
return temp & excepts & FE_ALL_EXCEPT;
}
diff --git a/libc/sysdeps/sparc/fpu/libm-test-ulps b/libc/sysdeps/sparc/fpu/libm-test-ulps
index 60a53aa43..d51e10c41 100644
--- a/libc/sysdeps/sparc/fpu/libm-test-ulps
+++ b/libc/sysdeps/sparc/fpu/libm-test-ulps
@@ -1000,9 +1000,16 @@ ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -1010,6 +1017,43 @@ double: 1
idouble: 1
ildouble: 2
ldouble: 2
+Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (1 + 355 i) == 8.140551093483276762350406321792653551513e-309 + 1.0 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan (1 + 365 i) == 1.677892637497921890115075995898773550884e-317 + 1.0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
+ildouble: 1
+ldouble: 1
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -1020,17 +1064,66 @@ ifloat: 2
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+double: 1
+idouble: 1
+Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (355 + 1 i) == 1.0 + 8.140551093483276762350406321792653551513e-309 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (365 + 1 i) == 1.0 + 1.677892637497921890115075995898773550884e-317 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
ildouble: 1
ldouble: 1
@@ -1437,6 +1530,17 @@ Test "log2 (0.75) == -.415037499278843818546261056052183492":
ildouble: 1
ldouble: 1
+# pow
+Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416":
+float: 1
+ifloat: 1
+Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744":
+float: 1
+ifloat: 1
+Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141":
+float: 1
+ifloat: 1
+
# pow_downward
Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948":
float: 1
@@ -2174,8 +2278,12 @@ ildouble: 1
ldouble: 1
Function: Real part of "ctan":
-ildouble: 1
-ldouble: 1
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "ctan":
double: 1
@@ -2185,17 +2293,19 @@ ldouble: 2
Function: Real part of "ctanh":
double: 1
-float: 2
+float: 1
idouble: 1
-ifloat: 2
-ildouble: 1
-ldouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "ctanh":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "erf":
double: 1
@@ -2305,6 +2415,10 @@ Function: "log2":
ildouble: 1
ldouble: 1
+Function: "pow":
+float: 1
+ifloat: 1
+
Function: "pow_downward":
float: 1
ifloat: 1
diff --git a/libc/sysdeps/sparc/mempcpy.S b/libc/sysdeps/sparc/mempcpy.S
new file mode 100644
index 000000000..4c9801375
--- /dev/null
+++ b/libc/sysdeps/sparc/mempcpy.S
@@ -0,0 +1 @@
+/* mempcpy is in memcpy.S */
diff --git a/libc/sysdeps/sparc/sparc32/dl-machine.h b/libc/sysdeps/sparc/sparc32/dl-machine.h
index f85683d1b..2dfeeb27a 100644
--- a/libc/sysdeps/sparc/sparc32/dl-machine.h
+++ b/libc/sysdeps/sparc/sparc32/dl-machine.h
@@ -204,9 +204,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The SPARC never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-/* The SPARC overlaps DT_RELA and DT_PLTREL. */
-#define ELF_MACHINE_PLTREL_OVERLAP 1
-
/* Undo the sub %sp, 6*4, %sp; add %sp, 22*4, %o0 below to get at the
value we want in __libc_stack_end. */
#define DL_STACK_END(cookie) \
@@ -362,6 +359,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (__builtin_expect (r_type == R_SPARC_NONE, 0))
return;
+ if (__builtin_expect (r_type == R_SPARC_SIZE32, 0))
+ {
+ *reloc_addr = sym->st_size + reloc->r_addend;
+ return;
+ }
+
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
{
diff --git a/libc/sysdeps/sparc/sparc32/memcopy.h b/libc/sysdeps/sparc/sparc32/memcopy.h
deleted file mode 100644
index 8659693e9..000000000
--- a/libc/sysdeps/sparc/sparc32/memcopy.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 1991, 1997 Free Software 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 <sysdeps/generic/memcopy.h>
-#undef reg_char
-#define reg_char int
diff --git a/libc/sysdeps/sparc/sparc32/memcpy.S b/libc/sysdeps/sparc/sparc32/memcpy.S
index a36f1d6aa..82fa6d104 100644
--- a/libc/sysdeps/sparc/sparc32/memcpy.S
+++ b/libc/sysdeps/sparc/sparc32/memcpy.S
@@ -104,11 +104,17 @@
std %t2, [%dst + offset + offset2 + 0x08];
.text
- .align 4
+ENTRY(__mempcpy)
+ add %o0, %o2, %g1
+ ba 101f
+ st %g1, [%sp + 64]
+END(__mempcpy)
+ .align 4
ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
- sub %o0, %o1, %o4
st %o0, [%sp + 64]
+101:
+ sub %o0, %o1, %o4
9: andcc %o4, 3, %o5
0: bne 86f
cmp %o2, 15
@@ -641,3 +647,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
END(memcpy)
libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
diff --git a/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c b/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c
new file mode 100644
index 000000000..304ad4ef1
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c
@@ -0,0 +1 @@
+#include <sparc64/multiarch/rtld-memcpy.c>
diff --git a/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c b/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
new file mode 100644
index 000000000..f24ae880a
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c
@@ -0,0 +1 @@
+#include <sparc64/multiarch/rtld-memset.c>
diff --git a/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c b/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c
new file mode 100644
index 000000000..6f8386bc7
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c
@@ -0,0 +1 @@
+#include <sparc64/rtld-memcpy.c>
diff --git a/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c b/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
new file mode 100644
index 000000000..49b29f573
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc32/sparcv9/rtld-memset.c
@@ -0,0 +1 @@
+#include <sparc64/rtld-memset.c>
diff --git a/libc/sysdeps/sparc/sparc64/dl-machine.h b/libc/sysdeps/sparc/sparc64/dl-machine.h
index 87655d28a..35c24d155 100644
--- a/libc/sysdeps/sparc/sparc64/dl-machine.h
+++ b/libc/sysdeps/sparc/sparc64/dl-machine.h
@@ -125,9 +125,6 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
/* The SPARC never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-/* The SPARC overlaps DT_RELA and DT_PLTREL. */
-#define ELF_MACHINE_PLTREL_OVERLAP 1
-
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
@@ -388,6 +385,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
if (__builtin_expect (r_type == R_SPARC_NONE, 0))
return;
+ if (__builtin_expect (r_type == R_SPARC_SIZE64, 0))
+ {
+ *reloc_addr = sym->st_size + reloc->r_addend;
+ return;
+ }
+
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
{
@@ -555,6 +558,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
(((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff));
break;
+ /* ABS34 code model reloc */
+ case R_SPARC_H34:
+ *(unsigned int *) reloc_addr =
+ ((*(unsigned int *)reloc_addr & 0xffc00000) |
+ ((value >> 12) & 0x3fffff));
+
/* MEDMID code model relocs */
case R_SPARC_H44:
*(unsigned int *) reloc_addr =
diff --git a/libc/sysdeps/sparc/sparc64/memcopy.h b/libc/sysdeps/sparc/sparc64/memcopy.h
deleted file mode 100644
index ec978e3c8..000000000
--- a/libc/sysdeps/sparc/sparc64/memcopy.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sparc32/memcopy.h>
diff --git a/libc/sysdeps/sparc/sparc64/memcpy.S b/libc/sysdeps/sparc/sparc64/memcpy.S
index a77c4e441..668ebecef 100644
--- a/libc/sysdeps/sparc/sparc64/memcpy.S
+++ b/libc/sysdeps/sparc/sparc64/memcpy.S
@@ -374,19 +374,24 @@ ENTRY(__memcpy_large)
mov %g4, %o0
END(__memcpy_large)
+ENTRY(__mempcpy)
+ ba,pt %xcc, 210f
+ add %o0, %o2, %g4
+END(__mempcpy)
+
.align 32
ENTRY(memcpy)
+ mov %o0, %g4 /* IEU0 Group */
210:
#ifndef USE_BPR
- srl %o2, 0, %o2 /* IEU1 Group */
+ srl %o2, 0, %o2 /* IEU1 */
#endif
brz,pn %o2, 209b /* CTI Group */
- mov %o0, %g4 /* IEU0 */
-218: cmp %o2, 15 /* IEU1 Group */
- bleu,pn %xcc, 208b /* CTI */
- cmp %o2, (64 * 6) /* IEU1 Group */
- bgeu,pn %xcc, 200b /* CTI */
- andcc %o0, 7, %g2 /* IEU1 Group */
+218: cmp %o2, 15 /* IEU1 */
+ bleu,pn %xcc, 208b /* CTI Group */
+ cmp %o2, (64 * 6) /* IEU1 */
+ bgeu,pn %xcc, 200b /* CTI Group */
+ andcc %o0, 7, %g2 /* IEU1 */
sub %o0, %o1, %g5 /* IEU0 */
andcc %g5, 3, %o5 /* IEU1 Group */
bne,pn %xcc, 212f /* CTI */
@@ -569,3 +574,7 @@ ENTRY(memcpy)
END(memcpy)
libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
index 8bada0eee..6ba1b0c6e 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
@@ -43,13 +43,19 @@
.text
+ENTRY(__mempcpy_niagara1)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_niagara1)
+
.align 32
ENTRY(__memcpy_niagara1)
+100: /* %o0=dst, %o1=src, %o2=len */
+ mov %o0, %g5
+101:
# ifndef USE_BPR
srl %o2, 0, %o2
# endif
-100: /* %o0=dst, %o1=src, %o2=len */
- mov %o0, %g5
cmp %o2, 0
be,pn %XCC, 85f
218: or %o0, %o1, %o3
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
index ccbb0252f..0e9442de5 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
@@ -145,13 +145,19 @@
.text
+ENTRY(__mempcpy_niagara2)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_niagara2)
+
.align 32
ENTRY(__memcpy_niagara2)
+100: /* %o0=dst, %o1=src, %o2=len */
+ mov %o0, %g5
+101:
# ifndef USE_BPR
srl %o2, 0, %o2
# endif
-100: /* %o0=dst, %o1=src, %o2=len */
- mov %o0, %g5
cmp %o2, 0
be,pn %XCC, 85f
218: or %o0, %o1, %o3
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
index 7e21665d5..0784ba9b5 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
@@ -38,6 +38,11 @@
.text
+ENTRY(__mempcpy_ultra3)
+ ba,pt %XCC, 101f
+ add %o0, %o2, %g5
+END(__mempcpy_ultra3)
+
/* Special/non-trivial issues of this code:
*
* 1) %o5 is preserved from VISEntryHalf to VISExitHalf
@@ -57,6 +62,7 @@ ENTRY(__memcpy_ultra3)
100: /* %o0=dst, %o1=src, %o2=len */
mov %o0, %g5
+101:
cmp %o2, 0
be,pn %XCC, out
218: or %o0, %o1, %o3
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S b/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
index 36c488672..20c72d9bb 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
@@ -1,5 +1,5 @@
/* Multiple versions of memcpy
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ 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.
@@ -72,12 +72,72 @@ ENTRY(memcpy)
mov %o1, %o0
END(memcpy)
-# undef libc_hidden_builtin_def
-/* IFUNC doesn't work with the hidden functions in a shared library. */
-# define libc_hidden_builtin_def(name) \
- .globl __GI_memcpy; __GI_memcpy = __memcpy_ultra1
+ENTRY(__mempcpy)
+ .type __mempcpy, @gnu_indirect_function
+# ifdef SHARED
+ SETUP_PIC_REG_LEAF(o3, o5)
+# endif
+ andcc %o0, HWCAP_SPARC_N2, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_niagara2), %o1
+ xor %o1, %gdop_lox10(__mempcpy_niagara2), %o1
+# else
+ set __mempcpy_niagara2, %o1
+# endif
+ ba 10f
+ nop
+1: be 1f
+ andcc %o0, HWCAP_SPARC_ULTRA3, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_niagara1), %o1
+ xor %o1, %gdop_lox10(__mempcpy_niagara1), %o1
+# else
+ set __mempcpy_niagara1, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
+ nop
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_ultra3), %o1
+ xor %o1, %gdop_lox10(__mempcpy_ultra3), %o1
+# else
+ set __mempcpy_ultra3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_ultra1), %o1
+ xor %o1, %gdop_lox10(__mempcpy_ultra1), %o1
+# else
+ set __mempcpy_ultra1, %o1
+# endif
+10:
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__mempcpy)
+
+libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+#undef weak_alias
+#define weak_alias(x, y)
+#undef libc_hidden_def
+#define libc_hidden_def(name)
#define memcpy __memcpy_ultra1
+#define __mempcpy __mempcpy_ultra1
#endif
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S b/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
index 5247bb3f9..1d1b3cc5f 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. For SUN4V Niagara.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller (davem@davemloft.net)
@@ -60,7 +60,7 @@ ENTRY(__bzero_niagara1)
wr %g0, ASI_P, %asi
cmp %o1, 15
- bl,pn %icc, 70f
+ blu,pn %XCC, 70f
andcc %o0, 0x7, %g1
be,pt %XCC, 2f
mov 8, %g2
@@ -71,7 +71,7 @@ ENTRY(__bzero_niagara1)
bne,pt %XCC, 1b
add %o0, 1, %o0
2: cmp %o1, 128
- bl,pn %icc, 60f
+ blu,pn %XCC, 60f
andcc %o0, (64 - 1), %g1
be,pt %XCC, 40f
mov 64, %g2
@@ -86,6 +86,51 @@ ENTRY(__bzero_niagara1)
wr %g0, ASI_BLK_INIT_QUAD_LDD_P, %asi
andn %o1, (64 - 1), %g1
sub %o1, %g1, %o1
+
+ andn %g1, (256 - 1), %g2
+ brz,pt %g2, 50f
+ and %g1, (256 - 1), %g1
+
+45:
+ stxa %o2, [%o0 + 0x00] %asi
+ stxa %o2, [%o0 + 0x08] %asi
+ stxa %o2, [%o0 + 0x10] %asi
+ stxa %o2, [%o0 + 0x18] %asi
+ stxa %o2, [%o0 + 0x20] %asi
+ stxa %o2, [%o0 + 0x28] %asi
+ stxa %o2, [%o0 + 0x30] %asi
+ stxa %o2, [%o0 + 0x38] %asi
+ stxa %o2, [%o0 + 0x40] %asi
+ stxa %o2, [%o0 + 0x48] %asi
+ stxa %o2, [%o0 + 0x50] %asi
+ stxa %o2, [%o0 + 0x58] %asi
+ stxa %o2, [%o0 + 0x60] %asi
+ stxa %o2, [%o0 + 0x68] %asi
+ stxa %o2, [%o0 + 0x70] %asi
+ stxa %o2, [%o0 + 0x78] %asi
+ stxa %o2, [%o0 + 0x80] %asi
+ stxa %o2, [%o0 + 0x88] %asi
+ stxa %o2, [%o0 + 0x90] %asi
+ stxa %o2, [%o0 + 0x98] %asi
+ stxa %o2, [%o0 + 0xa0] %asi
+ stxa %o2, [%o0 + 0xa8] %asi
+ stxa %o2, [%o0 + 0xb0] %asi
+ stxa %o2, [%o0 + 0xb8] %asi
+ stxa %o2, [%o0 + 0xc0] %asi
+ stxa %o2, [%o0 + 0xc8] %asi
+ stxa %o2, [%o0 + 0xd0] %asi
+ stxa %o2, [%o0 + 0xd8] %asi
+ stxa %o2, [%o0 + 0xe0] %asi
+ stxa %o2, [%o0 + 0xe8] %asi
+ stxa %o2, [%o0 + 0xf0] %asi
+ stxa %o2, [%o0 + 0xf8] %asi
+ subcc %g2, 256, %g2
+ bne,pt %XCC, 45b
+ add %o0, 256, %o0
+
+ brz,pn %g1, 55f
+ nop
+
50:
stxa %o2, [%o0 + 0x00] %asi
stxa %o2, [%o0 + 0x08] %asi
@@ -99,6 +144,7 @@ ENTRY(__bzero_niagara1)
bne,pt %XCC, 50b
add %o0, 64, %o0
+55:
wr %g0, ASI_P, %asi
brz,pn %o1, 80f
60:
@@ -115,7 +161,7 @@ ENTRY(__bzero_niagara1)
70:
1: stba %o2, [%o0 + 0x00] %asi
subcc %o1, 1, %o1
- bne,pt %icc, 1b
+ bne,pt %XCC, 1b
add %o0, 1, %o0
/* fallthrough */
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/memset.S b/libc/sysdeps/sparc/sparc64/multiarch/memset.S
index c717f0c9a..26cc669d6 100644
--- a/libc/sysdeps/sparc/sparc64/multiarch/memset.S
+++ b/libc/sysdeps/sparc/sparc64/multiarch/memset.S
@@ -1,5 +1,5 @@
/* Multiple versions of memset and bzero
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ 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.
@@ -88,10 +88,10 @@ weak_alias (__bzero, bzero)
# undef weak_alias
# define weak_alias(a, b)
-# undef libc_hidden_builtin_def
-/* IFUNC doesn't work with the hidden functions in a shared library. */
-# define libc_hidden_builtin_def(name) \
- .globl __GI_memset; __GI_memset = __memset_ultra1
+libc_hidden_builtin_def (memset)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
#define memset __memset_ultra1
#define __bzero __bzero_ultra1
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c b/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c
new file mode 100644
index 000000000..245257534
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c
@@ -0,0 +1 @@
+#include "../rtld-memcpy.c"
diff --git a/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c b/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
new file mode 100644
index 000000000..c01eb0beb
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc64/multiarch/rtld-memset.c
@@ -0,0 +1 @@
+#include "../rtld-memset.c"
diff --git a/libc/sysdeps/sparc/sparc64/rtld-memcpy.c b/libc/sysdeps/sparc/sparc64/rtld-memcpy.c
new file mode 100644
index 000000000..b1b06479d
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc64/rtld-memcpy.c
@@ -0,0 +1,2 @@
+#include <string/memcpy.c>
+#include <string/mempcpy.c>
diff --git a/libc/sysdeps/sparc/sparc64/rtld-memset.c b/libc/sysdeps/sparc/sparc64/rtld-memset.c
new file mode 100644
index 000000000..55f383579
--- /dev/null
+++ b/libc/sysdeps/sparc/sparc64/rtld-memset.c
@@ -0,0 +1 @@
+#include <string/memset.c>
diff --git a/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c b/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
index 6d8bd00cc..e24eee251 100644
--- a/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c
+++ b/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
ilogbl(x, exp)
- 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 Jakub Jelinek (jj@ultra.linux.cz).
@@ -28,7 +28,7 @@
#include "quad.h"
#include <math.h>
-int __ilogbl(long double x)
+int __ieee754_ilogbl (long double x)
{
FP_DECL_EX;
FP_DECL_Q(X);
@@ -77,5 +77,3 @@ int __ilogbl(long double x)
return FP_ILOGBNAN;
}
}
-
-weak_alias (__ilogbl, ilogbl)
diff --git a/libc/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h b/libc/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
index 6703473c5..1c763c247 100644
--- a/libc/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+++ b/libc/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
@@ -57,6 +57,7 @@
#define __BLKSIZE_T_TYPE __U32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
+#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/libc/sysdeps/unix/common/syscalls.list b/libc/sysdeps/unix/common/syscalls.list
index baec92f78..f0a5ea0a6 100644
--- a/libc/sysdeps/unix/common/syscalls.list
+++ b/libc/sysdeps/unix/common/syscalls.list
@@ -11,6 +11,5 @@ setpgid - setpgrp i:ii __setpgid setpgid
setregid - setregid i:ii __setregid setregid
setreuid - setreuid i:ii __setreuid setreuid
sigaction - sigaction i:ipp __sigaction sigaction
-sys_lstat lxstat lstat i:sp __syscall_lstat
truncate - truncate i:si __truncate truncate
vhangup - vhangup i:i vhangup
diff --git a/libc/sysdeps/unix/fxstat.c b/libc/sysdeps/unix/fxstat.c
deleted file mode 100644
index 4ebb93782..000000000
--- a/libc/sysdeps/unix/fxstat.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software 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 <bp-checks.h>
-
-extern int __syscall_fstat (int, struct stat *__unbounded);
-
-/* Get information about the file descriptor FD in BUF. */
-int
-__fxstat (int vers, int fd, struct stat *buf)
-{
- if (vers != _STAT_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __syscall_fstat (fd, CHECK_1 (buf));
-}
-hidden_def (__fxstat)
-weak_alias (__fxstat, _fxstat)
diff --git a/libc/sysdeps/unix/mkdir.c b/libc/sysdeps/unix/mkdir.c
deleted file mode 100644
index 7384e0312..000000000
--- a/libc/sysdeps/unix/mkdir.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software 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 <sys/types.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <string.h>
-
-/* Create a directory named PATH with protections MODE. */
-int
-__mkdir (path, mode)
- const char *path;
- mode_t mode;
-{
- char *cmd = __alloca (80 + strlen (path));
- char *p;
- int status;
- mode_t mask;
- int save;
- struct stat statbuf;
-
- if (path == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* Check for some errors. */
- if (__stat (path, &statbuf) < 0)
- {
- if (errno != ENOENT)
- return -1;
- /* There is no file by that name. Good. */
- }
- else
- {
- __set_errno (EEXIST);
- return -1;
- }
-
- /* Race condition, but how else to do it? */
- mask = __umask (0777);
- (void) __umask (mask);
-
- p = cmd;
- *p++ = 'm';
- *p++ = 'k';
- *p++ = 'd';
- *p++ = 'i';
- *p++ = 'r';
- *p++ = ' ';
-
- mode &= ~mask;
- *p++ = '-';
- *p++ = 'm';
- *p++ = ' ';
- *p++ = ((mode & 07000) >> 9) + '0';
- *p++ = ((mode & 0700) >> 6) + '0';
- *p++ = ((mode & 070) >> 3) + '0';
- *p++ = ((mode & 07)) + '0';
- *p++ = ' ';
-
- strcpy (p, path);
-
- save = errno;
- /* If system doesn't set errno, but the mkdir fails, we really
- have no idea what went wrong. EIO is the vaguest error I
- can think of, so I'll use that. */
- __set_errno (EIO);
- status = system (cmd);
- if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
- {
- __set_errno (save);
- return 0;
- }
- else
- return -1;
-}
-
-weak_alias (__mkdir, mkdir)
diff --git a/libc/sysdeps/unix/rmdir.c b/libc/sysdeps/unix/rmdir.c
deleted file mode 100644
index ba47df474..000000000
--- a/libc/sysdeps/unix/rmdir.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software 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 <sys/types.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <string.h>
-
-/* Create a directory named PATH with protections MODE. */
-int
-__rmdir (path)
- const char *path;
-{
- char *cmd = __alloca (80 + strlen (path));
- char *p;
- int status;
- int save;
- struct stat statbuf;
-
- if (path == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* Check for some errors. */
- if (__stat (path, &statbuf) < 0)
- return -1;
- if (!S_ISDIR (statbuf.st_mode))
- {
- __set_errno (ENOTDIR);
- return -1;
- }
-
- p = cmd;
- *p++ = 'r';
- *p++ = 'm';
- *p++ = 'd';
- *p++ = 'i';
- *p++ = 'r';
- *p++ = ' ';
-
- strcpy (p, path);
-
- save = errno;
- /* If system doesn't set errno, but the rmdir fails, we really
- have no idea what went wrong. EIO is the vaguest error I
- can think of, so I'll use that. */
- __set_errno (EIO);
- status = system (cmd);
- if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
- {
- return 0;
- __set_errno (save);
- }
- else
- return -1;
-}
-
-weak_alias (__rmdir, rmdir)
diff --git a/libc/sysdeps/unix/siglist.c b/libc/sysdeps/unix/siglist.c
deleted file mode 100644
index 0fcc40e84..000000000
--- a/libc/sysdeps/unix/siglist.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2002 Free Software 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 <stddef.h>
-#include <libintl.h>
-
-/* This is a list of all known signal numbers. */
-
-const char *const _sys_siglist[] =
- {
- N_("Signal 0"),
- N_("Hangup"),
- N_("Interrupt"),
- N_("Quit"),
- N_("Illegal instruction"),
- N_("Trace/breakpoint trap"),
- N_("IOT trap"),
- N_("EMT trap"),
- N_("Floating point exception"),
- N_("Killed"),
- N_("Bus error"),
- N_("Segmentation fault"),
- N_("Bad system call"),
- N_("Broken pipe"),
- N_("Alarm clock"),
- N_("Terminated"),
- N_("Urgent I/O condition"),
- N_("Stopped (signal)"),
- N_("Stopped"),
- N_("Continued"),
- N_("Child exited"),
- N_("Stopped (tty input)"),
- N_("Stopped (tty output)"),
- N_("I/O possible"),
- N_("CPU time limit exceeded"),
- N_("File size limit exceeded"),
- N_("Virtual timer expired"),
- N_("Profiling timer expired"),
- N_("Window changed"),
- N_("Resource lost"),
- N_("User defined signal 1"),
- N_("User defined signal 2"),
- NULL
- };
-strong_alias (_sys_siglist, _sys_siglist_internal)
-
-weak_alias (_sys_siglist, sys_siglist)
diff --git a/libc/sysdeps/unix/syscalls.list b/libc/sysdeps/unix/syscalls.list
index ad4917078..4512a4b4b 100644
--- a/libc/sysdeps/unix/syscalls.list
+++ b/libc/sysdeps/unix/syscalls.list
@@ -56,9 +56,6 @@ swapon - swapon i:s swapon
symlink - symlink i:ss __symlink symlink
sync - sync i: sync
syncfs - syncfs i:i syncfs
-sys_fstat fxstat fstat i:ip __syscall_fstat
-sys_mknod xmknod mknod i:sii __syscall_mknod
-sys_stat xstat stat i:sp __syscall_stat
umask - umask Ei:i __umask umask
uname - uname i:p __uname uname
unlink - unlink i:s __unlink unlink
diff --git a/libc/sysdeps/unix/sysv/Makefile b/libc/sysdeps/unix/sysv/Makefile
deleted file mode 100644
index 34a2d88a8..000000000
--- a/libc/sysdeps/unix/sysv/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997 Free Software 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/>.
-
-ifeq ($(subdir),termios)
-
-ifeq (,$(filter termio.h,$(sysdep_headers)))
-
-sysdep_headers := $(sysdep_headers) termio.h
-generated := $(generated) termio.h
-
-# termio.h is just like sysv_termio.h except it uses the same names for
-# everything that System V termio does. sysv_termio.h is necessary to
-# include in __tcgetatr.c et al, because some of the names in termio.h
-# conflict with termios.h. The C library doesn't actually use termio.h,
-# but we generate it for those application programs which use it.
-$(objpfx)termio.h: $(..)sysdeps/unix/sysv/sysv_termio.h
- sed < $< > $@-tmp \
- -e 's/_SYSV_//' \
- -e 's/^#define[ ]*_T/#define T/'\
- -e 's/__sysv_termio/termio/'
- mv $@-tmp $@
-
-endif
-endif
-
-# In SYSV style archives the symbol table member has an empty name.
-ar-symtab-name =
diff --git a/libc/sysdeps/unix/sysv/Versions b/libc/sysdeps/unix/sysv/Versions
deleted file mode 100644
index bdb8ba836..000000000
--- a/libc/sysdeps/unix/sysv/Versions
+++ /dev/null
@@ -1,5 +0,0 @@
-libc {
- GLIBC_2.0 {
- sysinfo;
- }
-}
diff --git a/libc/sysdeps/unix/sysv/bits/dirent.h b/libc/sysdeps/unix/sysv/bits/dirent.h
deleted file mode 100644
index e03e69057..000000000
--- a/libc/sysdeps/unix/sysv/bits/dirent.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Directory entry structure `struct dirent'. Old System V version.
- Copyright (C) 1996, 1997 Free Software 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
- {
- unsigned short int d_fileno;
- char d_name[14];
- };
diff --git a/libc/sysdeps/unix/sysv/bits/fcntl.h b/libc/sysdeps/unix/sysv/bits/fcntl.h
deleted file mode 100644
index e9f5085c0..000000000
--- a/libc/sysdeps/unix/sysv/bits/fcntl.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* O_*, F_*, FD_* bit values for System V.
- Copyright (C) 1991, 1992, 1997 Free Software 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 00400 /* Create file if it doesn't exist. */
-#define O_EXCL 02000 /* Fail if file already exists. */
-#define O_TRUNC 01000 /* Truncate file to zero length. */
-#if defined __USE_BSD || defined __USE_SVID
-#define O_SYNC 00020 /* Synchronous writes. */
-#define O_FSYNC O_SYNC
-#endif
-
-/* File status flags for `open' and `fcntl'. */
-#define O_APPEND 000010 /* Writes append to the file. */
-#define O_NONBLOCK 000004 /* Non-blocking I/O. */
-
-#ifdef __USE_BSD
-/* System V doesn't support POSIX.1 O_NONBLOCK, but O_NDELAY is close. */
-#define O_NDELAY O_NONBLOCK
-#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. */
-#define F_GETLK 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info. */
-#define F_SETLKW 7 /* Set record locking info, wait. */
-
-/* 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_sysid; /* System ID where locking process resides. */
- 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. */
-
-
-/* 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 FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#endif /* Use BSD. */
diff --git a/libc/sysdeps/unix/sysv/bits/local_lim.h b/libc/sysdeps/unix/sysv/bits/local_lim.h
deleted file mode 100644
index 7bb71dda1..000000000
--- a/libc/sysdeps/unix/sysv/bits/local_lim.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1992, 1996 Free Software 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 NGROUPS_MAX 0 /* No supplementary groups. */
-#define ARG_MAX 5120
-#define CHILD_MAX 25
-#define OPEN_MAX 60
-#define LINK_MAX 1000
-#define MAX_CANON 256
-
-/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs
- file systems, even though the System V limits.h incorrectly
- defines it as 14. Giving it a value which is too large
- is harmless (it is a maximum). */
-#define NAME_MAX 255
-
-#define PATH_MAX 1024
diff --git a/libc/sysdeps/unix/sysv/bits/signum.h b/libc/sysdeps/unix/sysv/bits/signum.h
deleted file mode 100644
index e007f4470..000000000
--- a/libc/sysdeps/unix/sysv/bits/signum.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Signal number definitions. System V version.
- Copyright (C) 1991, 1992, 1993, 1996 Free Software 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/>. */
-
-#ifdef _SIGNAL_H
-
-/* This file defines the fake signal functions and signal
- number constants for System V release 3. */
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap (4.2 BSD). */
-#define SIGEMT 7 /* EMT trap (4.2 BSD). */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error (4.2 BSD). */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
-#define SIGCHLD 18 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power failure restart (System V). */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 20 /* Biggest signal number + 1. */
diff --git a/libc/sysdeps/unix/sysv/bits/stat.h b/libc/sysdeps/unix/sysv/bits/stat.h
deleted file mode 100644
index 713e014c8..000000000
--- a/libc/sysdeps/unix/sysv/bits/stat.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 1992, 1996, 1997, 2000, 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/>. */
-
-#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
-
-struct stat
- {
- short int st_dev;
- unsigned short int st_ino;
- unsigned short int st_mode;
- short int st_nlink;
- unsigned short int st_uid;
- unsigned short int st_gid;
- short int st_rdev;
- long int st_size;
- long int st_atime;
- long int st_mtime;
- long int st_ctime;
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* POSIX.1b objects. */
-#define __S_TYPEISMQ(buf) (0)
-#define __S_TYPEISSEM(buf) (0)
-#define __S_TYPEISSHM(buf) (0)
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/libc/sysdeps/unix/sysv/bits/utmp.h b/libc/sysdeps/unix/sysv/bits/utmp.h
deleted file mode 100644
index 5f6cb77cd..000000000
--- a/libc/sysdeps/unix/sysv/bits/utmp.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* The `struct utmp' type, describing entries in the utmp file. System V.
- Copyright (C) 1996, 1997 Free Software 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 _UTMP_H
-# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
-#endif
-
-
-#include <time.h>
-
-#define _PATH_UTMP "/var/adm/utmp"
-#define _PATH_WTMP "/var/adm/wtmp"
-#define _PATH_LASTLOG "/var/adm/lastlog"
-
-
-struct utmp
- {
-#define ut_name ut_user
- char ut_user[8];
- char ut_id[4];
- char ut_line[12];
- short int ut_pid;
- short int ut_type;
- struct exit_status
- {
- short int e_termination;
- short int e_exit;
- } ut_exit;
- __time_t ut_time;
- };
-
-
-/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, UT_ID
- and UT_TV fields. */
-#define _HAVE_UT_TYPE 1
-#define _HAVE_UT_ID 1
-#define _HAVE_UT_TV 1
-#define _HAVE_UT_HOST 1
diff --git a/libc/sysdeps/unix/sysv/bits/utsname.h b/libc/sysdeps/unix/sysv/bits/utsname.h
deleted file mode 100644
index 3a9f1fbec..000000000
--- a/libc/sysdeps/unix/sysv/bits/utsname.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1997 Free Software 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_UTSNAME_H
-# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
-#endif
-
-#define _UTSNAME_LENGTH 9
diff --git a/libc/sysdeps/unix/sysv/direct.h b/libc/sysdeps/unix/sysv/direct.h
deleted file mode 100644
index dc1d77bee..000000000
--- a/libc/sysdeps/unix/sysv/direct.h
+++ /dev/null
@@ -1,10 +0,0 @@
-struct direct
- {
- unsigned short int d_fileno;
- char d_name[14];
- };
-
-#define D_NAMLEN(d) \
- ((d)->d_name[13] == '\0' ? strlen ((d)->d_name) : 14)
-
-#define D_RECLEN(d) (sizeof (*(d)))
diff --git a/libc/sysdeps/unix/sysv/i386/time.S b/libc/sysdeps/unix/sysv/i386/time.S
deleted file mode 100644
index 58da17c5f..000000000
--- a/libc/sysdeps/unix/sysv/i386/time.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1991,92,96,97,2002, 2003 Free Software 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 <asm-syntax.h>
-
-PSEUDO_NOERRNO (time, time, 1)
- movl 4(%esp), %edx /* Put passed pointer in %edx. */
- testl %edx, %edx /* Is it non-nil? */
- je L(null)
- movl %eax, (%edx) /* Yes; store the time there. */
-L(null):
- ret
-PSEUDO_END_NOERRNO (time)
-libc_hidden_def (time)
diff --git a/libc/sysdeps/unix/sysv/linux/Versions b/libc/sysdeps/unix/sysv/linux/Versions
index 7f2f1b9ff..16bb28159 100644
--- a/libc/sysdeps/unix/sysv/linux/Versions
+++ b/libc/sysdeps/unix/sysv/linux/Versions
@@ -51,7 +51,7 @@ libc {
setfsgid; setfsuid;
# s*
- setresgid; setresuid; swapoff; swapon; sysctl;
+ setresgid; setresuid; swapoff; swapon; sysctl; sysinfo;
# u*
umount; uselib;
@@ -142,7 +142,7 @@ libc {
fallocate;
}
GLIBC_2.12 {
- #errlist-compat 134
+ #errlist-compat 135
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
ntp_gettimex;
diff --git a/libc/sysdeps/unix/sysv/linux/bits/socket.h b/libc/sysdeps/unix/sysv/linux/bits/socket.h
index 7fa7eea6c..309cba728 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/socket.h
@@ -236,11 +236,12 @@ struct msghdr
};
#ifdef __USE_GNU
-/* For `recvmmsg'. */
+/* For `recvmmsg' and 'sendmmsg'. */
struct mmsghdr
{
struct msghdr msg_hdr; /* Actual message header. */
- unsigned int msg_len; /* Number of received bytes for the entry. */
+ unsigned int msg_len; /* Number of received or sent bytes
+ for the entry. */
};
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/i386/syscalls.list b/libc/sysdeps/unix/sysv/linux/i386/syscalls.list
index 149d43234..e3bcabac1 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/syscalls.list
+++ b/libc/sysdeps/unix/sysv/linux/i386/syscalls.list
@@ -2,7 +2,7 @@
modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt
vm86old EXTRA vm86old i:p __vm86old vm86@GLIBC_2.0
-vm86 - vm86 i:ip __vm86 vm86@@GLIBC_2.3.4
+vm86 - vm86 i:ip __vm86 vm86
oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
waitpid - waitpid Ci:ipi __waitpid waitpid __libc_waitpid
diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
index ee8553123..af7021f1e 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+++ b/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
@@ -63,6 +63,7 @@
/* size_t is unsigned long int on s390 -m31. */
#define __SSIZE_T_TYPE __SLONGWORD_TYPE
#endif
+#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
index 37b7656aa..bba82b37a 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
@@ -57,6 +57,7 @@
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
+#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index e3cea9fb5..cbb817952 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
@@ -126,7 +126,7 @@ __get_clockfreq_via_proc_openprom (void)
__stpcpy (prop, "/clock-frequency");
clkfreq_fd = open (node, O_RDONLY);
- if (fd != -1)
+ if (clkfreq_fd != -1)
{
if (read (clkfreq_fd, type_string,
sizeof (type_string)) > 0)
diff --git a/libc/sysdeps/unix/sysv/setrlimit.c b/libc/sysdeps/unix/sysv/setrlimit.c
deleted file mode 100644
index 9049248bc..000000000
--- a/libc/sysdeps/unix/sysv/setrlimit.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* setrlimit function for systems with ulimit system call (SYSV).
- Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software 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 only implements those functions which are available via ulimit. */
-
-#include <sys/resource.h>
-#include <stddef.h>
-#include <errno.h>
-
-/* Set the soft and hard limits for RESOURCE to *RLIMITS.
- Only the super-user can increase hard limits.
- Return 0 if successful, -1 if not (and sets errno). */
-int
-setrlimit (resource, rlimits)
- enum __rlimit_resource resource;
- const struct rlimit *rlimits;
-{
- if (rlimits == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- switch (resource)
- {
- case RLIMIT_FSIZE:
- return __ulimit (2, rlimits->rlim_cur);
-
- case RLIMIT_DATA:
- case RLIMIT_CPU:
- case RLIMIT_STACK:
- case RLIMIT_CORE:
- case RLIMIT_RSS:
- __set_errno (ENOSYS);
- return -1;
-
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
diff --git a/libc/sysdeps/unix/sysv/settimeofday.c b/libc/sysdeps/unix/sysv/settimeofday.c
deleted file mode 100644
index fa9401d0c..000000000
--- a/libc/sysdeps/unix/sysv/settimeofday.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 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/>. */
-
-#include <errno.h>
-#include <time.h>
-#include <sys/time.h>
-
-/* Set the current time of day and timezone information.
- This call is restricted to the super-user. */
-int
-__settimeofday (tv, tz)
- const struct timeval *tv;
- const struct timezone *tz;
-{
- time_t when;
-
- if (tv == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (tz != NULL || tv->tv_usec % 1000000 != 0)
- {
- __set_errno (ENOSYS);
- return -1;
- }
-
- when = tv->tv_sec + (tv->tv_usec / 1000000);
- return stime (&when);
-}
-
-weak_alias (__settimeofday, settimeofday)
diff --git a/libc/sysdeps/unix/sysv/sigaction.c b/libc/sysdeps/unix/sysv/sigaction.c
deleted file mode 100644
index 285c0331a..000000000
--- a/libc/sysdeps/unix/sysv/sigaction.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (C) 1992,1994,1995,1996,1997,2002 Free Software 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 <errno.h>
-#include <stddef.h>
-#include <signal.h>
-
-
-/* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
-{
- sighandler_t handler;
- int save;
-
- if (sig <= 0 || sig >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (act == NULL)
- {
- if (oact == NULL)
- return 0;
- /* Race condition, but this is the only way to do it. */
- handler = signal (sig, SIG_IGN);
- if (handler == SIG_ERR)
- return -1;
- save = errno;
- (void) signal (sig, handler);
- __set_errno (save);
- }
- else
- {
- int i;
-
- if (act->sa_flags != 0)
- {
- unimplemented:
- __set_errno (ENOSYS);
- return -1;
- }
-
- for (i = 1; i < NSIG; ++i)
- if (__sigismember (&act->sa_mask, i))
- goto unimplemented;
-
- handler = signal (sig, act->sa_handler);
- if (handler == SIG_ERR)
- return -1;
- }
-
- if (oact != NULL)
- {
- oact->sa_handler = handler;
- __sigemptyset (&oact->sa_mask);
- oact->sa_flags = 0;
- }
-
- return 0;
-}
-libc_hidden_def (__sigaction)
-weak_alias (__sigaction, sigaction)
diff --git a/libc/sysdeps/unix/sysv/sysv_termio.h b/libc/sysdeps/unix/sysv/sysv_termio.h
deleted file mode 100644
index c11586287..000000000
--- a/libc/sysdeps/unix/sysv/sysv_termio.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Copyright (C) 1992, 1997 Free Software 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/>. */
-
-/* In various parts of this file we define the System V values for
- things as _SYSV_<whatever>. Those are the values that System V
- uses for termio, and also (SVR4) termios. Not necessarily the
- same as the GNU termios that the library user sees. */
-
-/* Number of elements of c_cc. termio only. */
-#define _SYSV_NCC 8
-
-#define _SYSV_VINTR 0
-#define _SYSV_VQUIT 1
-#define _SYSV_VERASE 2
-#define _SYSV_VKILL 3
-#define _SYSV_VEOF 4
-/* This field means VEOF if ICANON, VMIN if not. */
-#define _SYSV_VMIN 4
-#define _SYSV_VEOL 5
-/* This field means VEOL if ICANON, VTIME if not. */
-#define _SYSV_VTIME 5
-#define _SYSV_VEOL2 6
-
-/* Flags in c_iflag. */
-#define _SYSV_IGNBRK 1
-#define _SYSV_BRKINT 2
-#define _SYSV_IGNPAR 4
-#define _SYSV_PARMRK 8
-#define _SYSV_INPCK 0x10
-#define _SYSV_ISTRIP 0x20
-#define _SYSV_INLCR 0x40
-#define _SYSV_IGNCR 0x80
-#define _SYSV_ICRNL 0x100
-#define _SYSV_IUCLC 0x200
-#define _SYSV_IXON 0x400
-#define _SYSV_IXANY 0x800
-#define _SYSV_IXOFF 0x1000
-#define _SYSV_IMAXBEL 0x2000
-
-/* Flags in c_cflag. */
-#define _SYSV_CBAUD 0xf
-#define _SYSV_CIBAUD 0xf0000 /* termios only. */
-#define _SYSV_IBSHIFT 16
-/* Values for CBAUD and CIBAUD. */
-#define _SYSV_B0 0
-#define _SYSV_B50 1
-#define _SYSV_B75 2
-#define _SYSV_B110 3
-#define _SYSV_B134 4
-#define _SYSV_B150 5
-#define _SYSV_B200 6
-#define _SYSV_B300 7
-#define _SYSV_B600 8
-#define _SYSV_B1200 9
-#define _SYSV_B1800 10
-#define _SYSV_B2400 11
-#define _SYSV_B4800 12
-#define _SYSV_B9600 13
-#define _SYSV_B19200 14
-#define _SYSV_B38400 15
-
-#define _SYSV_CS5 0
-#define _SYSV_CS6 0x10
-#define _SYSV_CS7 0x20
-#define _SYSV_CS8 0x30
-#define _SYSV_CSIZE 0x30
-#define _SYSV_CSTOPB 0x40
-#define _SYSV_CREAD 0x80
-#define _SYSV_PARENB 0x100
-#define _SYSV_PARODD 0x200
-#define _SYSV_HUPCL 0x400
-#define _SYSV_CLOCAL 0x800
-
-/* Flags in c_lflag. */
-#define _SYSV_ISIG 1
-#define _SYSV_ICANON 2
-#define _SYSV_ECHO 8
-#define _SYSV_ECHOE 0x10
-#define _SYSV_ECHOK 0x20
-#define _SYSV_ECHONL 0x40
-#define _SYSV_NOFLSH 0x80
-#define _SYSV_TOSTOP 0x100
-#define _SYSV_ECHOCTL 0x200
-#define _SYSV_ECHOPRT 0x400
-#define _SYSV_ECHOKE 0x800
-#define _SYSV_FLUSHO 0x2000
-#define _SYSV_PENDIN 0x4000
-#define _SYSV_IEXTEN 0x8000
-
-/* Flags in c_oflag. */
-#define _SYSV_OPOST 1
-#define _SYSV_OLCUC 2
-#define _SYSV_ONLCR 4
-#define _SYSV_NLDLY 0x100
-#define _SYSV_NL0 0
-#define _SYSV_NL1 0x100
-#define _SYSV_CRDLY 0x600
-#define _SYSV_CR0 0
-#define _SYSV_CR1 0x200
-#define _SYSV_CR2 0x400
-#define _SYSV_CR3 0x600
-#define _SYSV_TABDLY 0x1800
-#define _SYSV_TAB0 0
-#define _SYSV_TAB1 0x0800
-#define _SYSV_TAB2 0x1000
-/* TAB3 is an obsolete name for XTABS. But we provide it since some
- programs expect it to exist. */
-#define _SYSV_TAB3 0x1800
-#define _SYSV_XTABS 0x1800
-#define _SYSV_BSDLY 0x2000
-#define _SYSV_BS0 0
-#define _SYSV_BS1 0x2000
-#define _SYSV_VTDLY 0x4000
-#define _SYSV_VT0 0
-#define _SYSV_VT1 0x4000
-#define _SYSV_FFDLY 0x8000
-#define _SYSV_FF0 0
-#define _SYSV_FF1 0x8000
-
-/* ioctl's. */
-
-#define _TCGETA 0x5401
-#define _TCSETA 0x5402
-#define _TCSETAW 0x5403
-#define _TCSETAF 0x5404
-#define _TCSBRK 0x5405
-#define _TCXONC 0x5406
-#define _TCFLSH 0x5407
-#define _TIOCGPGRP 0x7414
-#define _TIOCSPGRP 0x7415
-
-struct __sysv_termio
- {
- unsigned short c_iflag;
- unsigned short c_oflag;
- unsigned short c_cflag;
- unsigned short c_lflag;
- char c_line;
- unsigned char c_cc[_SYSV_NCC];
- };
diff --git a/libc/sysdeps/unix/sysv/tcflow.c b/libc/sysdeps/unix/sysv/tcflow.c
deleted file mode 100644
index 4c7eafe00..000000000
--- a/libc/sysdeps/unix/sysv/tcflow.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 1992, 1996, 1997, 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/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-#include <sysv_termio.h>
-
-/* Suspend or restart transmission on FD. */
-int
-tcflow (fd, action)
- int fd;
- int action;
-{
- switch (action)
- {
- case TCOOFF:
- return __ioctl (fd, _TCXONC, 0);
- case TCOON:
- return __ioctl (fd, _TCXONC, 1);
- case TCIOFF:
- return __ioctl (fd, _TCXONC, 2);
- case TCION:
- return __ioctl (fd, _TCXONC, 3);
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
diff --git a/libc/sysdeps/unix/sysv/tcgetattr.c b/libc/sysdeps/unix/sysv/tcgetattr.c
deleted file mode 100644
index 89558c4bf..000000000
--- a/libc/sysdeps/unix/sysv/tcgetattr.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software 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 <sysv_termio.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-
-/* Put the state of FD into *TERMIOS_P. */
-int
-__tcgetattr (fd, termios_p)
- int fd;
- struct termios *termios_p;
-{
- struct __sysv_termio buf;
- int termio_speed;
-
- if (termios_p == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (__ioctl (fd, _TCGETA, &buf) < 0)
- return -1;
-
- termio_speed = buf.c_cflag & _SYSV_CBAUD;
- termios_p->__ospeed =
- (termio_speed == _SYSV_B0 ? 0 :
- termio_speed == _SYSV_B50 ? 50 :
- termio_speed == _SYSV_B75 ? 75 :
- termio_speed == _SYSV_B110 ? 110 :
- termio_speed == _SYSV_B134 ? 134 :
- termio_speed == _SYSV_B150 ? 150 :
- termio_speed == _SYSV_B200 ? 200 :
- termio_speed == _SYSV_B300 ? 300 :
- termio_speed == _SYSV_B600 ? 600 :
- termio_speed == _SYSV_B1200 ? 1200 :
- termio_speed == _SYSV_B1800 ? 1800 :
- termio_speed == _SYSV_B2400 ? 2400 :
- termio_speed == _SYSV_B4800 ? 4800 :
- termio_speed == _SYSV_B9600 ? 9600 :
- termio_speed == _SYSV_B19200 ? 19200 :
- termio_speed == _SYSV_B38400 ? 38400 :
- -1);
- termios_p->__ispeed = termios_p->__ospeed;
-
- termios_p->c_iflag = 0;
- if (buf.c_iflag & _SYSV_IGNBRK)
- termios_p->c_iflag |= IGNBRK;
- if (buf.c_iflag & _SYSV_BRKINT)
- termios_p->c_iflag |= BRKINT;
- if (buf.c_iflag & _SYSV_IGNPAR)
- termios_p->c_iflag |= IGNPAR;
- if (buf.c_iflag & _SYSV_PARMRK)
- termios_p->c_iflag |= PARMRK;
- if (buf.c_iflag & _SYSV_INPCK)
- termios_p->c_iflag |= INPCK;
- if (buf.c_iflag & _SYSV_ISTRIP)
- termios_p->c_iflag |= ISTRIP;
- if (buf.c_iflag & _SYSV_INLCR)
- termios_p->c_iflag |= INLCR;
- if (buf.c_iflag & _SYSV_IGNCR)
- termios_p->c_iflag |= IGNCR;
- if (buf.c_iflag & _SYSV_ICRNL)
- termios_p->c_iflag |= ICRNL;
- if (buf.c_iflag & _SYSV_IXON)
- termios_p->c_iflag |= IXON;
- if (buf.c_iflag & _SYSV_IXOFF)
- termios_p->c_iflag |= IXOFF;
- if (buf.c_iflag & _SYSV_IXANY)
- termios_p->c_iflag |= IXANY;
- if (buf.c_iflag & _SYSV_IMAXBEL)
- termios_p->c_iflag |= IMAXBEL;
-
- termios_p->c_oflag = 0;
- if (buf.c_oflag & OPOST)
- termios_p->c_oflag |= OPOST;
- if (buf.c_oflag & ONLCR)
- termios_p->c_oflag |= ONLCR;
- termios_p->c_cflag = 0;
- switch (buf.c_cflag & _SYSV_CSIZE)
- {
- case _SYSV_CS5:
- termios_p->c_cflag |= CS5;
- break;
- case _SYSV_CS6:
- termios_p->c_cflag |= CS6;
- break;
- case _SYSV_CS7:
- termios_p->c_cflag |= CS7;
- break;
- case _SYSV_CS8:
- termios_p->c_cflag |= CS8;
- break;
- }
- if (buf.c_cflag & _SYSV_CSTOPB)
- termios_p->c_cflag |= CSTOPB;
- if (buf.c_cflag & _SYSV_CREAD)
- termios_p->c_cflag |= CREAD;
- if (buf.c_cflag & _SYSV_PARENB)
- termios_p->c_cflag |= PARENB;
- if (buf.c_cflag & _SYSV_PARODD)
- termios_p->c_cflag |= PARODD;
- if (buf.c_cflag & _SYSV_HUPCL)
- termios_p->c_cflag |= HUPCL;
- if (buf.c_cflag & _SYSV_CLOCAL)
- termios_p->c_cflag |= CLOCAL;
- termios_p->c_lflag = 0;
- if (buf.c_lflag & _SYSV_ISIG)
- termios_p->c_lflag |= _ISIG;
- if (buf.c_lflag & _SYSV_ICANON)
- termios_p->c_lflag |= _ICANON;
- if (buf.c_lflag & _SYSV_ECHO)
- termios_p->c_lflag |= _ECHO;
- if (buf.c_lflag & _SYSV_ECHOE)
- termios_p->c_lflag |= _ECHOE;
- if (buf.c_lflag & _SYSV_ECHOK)
- termios_p->c_lflag |= _ECHOK;
- if (buf.c_lflag & _SYSV_ECHONL)
- termios_p->c_lflag |= _ECHONL;
- if (buf.c_lflag & _SYSV_NOFLSH)
- termios_p->c_lflag |= _NOFLSH;
- if (buf.c_lflag & _SYSV_TOSTOP)
- termios_p->c_lflag |= _TOSTOP;
- if (buf.c_lflag & _SYSV_ECHOKE)
- termios_p->c_lflag |= ECHOKE;
- if (buf.c_lflag & _SYSV_ECHOPRT)
- termios_p->c_lflag |= ECHOPRT;
- if (buf.c_lflag & _SYSV_ECHOCTL)
- termios_p->c_lflag |= ECHOCTL;
- if (buf.c_lflag & _SYSV_FLUSHO)
- termios_p->c_lflag |= FLUSHO;
- if (buf.c_lflag & _SYSV_PENDIN)
- termios_p->c_lflag |= PENDIN;
- if (buf.c_lflag & _SYSV_IEXTEN)
- termios_p->c_lflag |= IEXTEN;
-
- termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF];
- termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL];
- termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2];
- termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE];
- termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL];
- termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR];
- termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT];
- termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */
- termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */
- termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */
- termios_p->c_cc[VMIN] = buf.c_cc[_SYSV_VMIN];
- termios_p->c_cc[VTIME] = buf.c_cc[_SYSV_VTIME];
-
- return 0;
-}
-
-weak_alias (__tcgetattr, tcgetattr)
diff --git a/libc/sysdeps/unix/sysv/tcsendbrk.c b/libc/sysdeps/unix/sysv/tcsendbrk.c
deleted file mode 100644
index 047403ca5..000000000
--- a/libc/sysdeps/unix/sysv/tcsendbrk.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software 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 <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sysv_termio.h>
-#include <sys/ioctl.h>
-
-/* Send zero bits on FD. */
-int
-tcsendbreak (fd, duration)
- int fd;
- int duration;
-{
- /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
- and an implementation-defined period if DURATION is nonzero.
- We define a positive DURATION to be number of milliseconds to break. */
- if (duration <= 0)
- return __ioctl (fd, _TCSBRK, 0);
-
- /* ioctl can't send a break of any other duration for us.
- This could be changed to use trickery (e.g. lower speed and
- send a '\0') to send the break, but for now just return an error. */
- __set_errno (EINVAL);
- return -1;
-}
diff --git a/libc/sysdeps/unix/sysv/tcsetattr.c b/libc/sysdeps/unix/sysv/tcsetattr.c
deleted file mode 100644
index ca173b2e2..000000000
--- a/libc/sysdeps/unix/sysv/tcsetattr.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2002 Free Software 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 <termios.h>
-#include <sys/ioctl.h>
-
-#include <sysv_termio.h>
-
-
-const speed_t __unix_speeds[] =
- {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- };
-
-
-/* Set the state of FD to *TERMIOS_P. */
-int
-tcsetattr (fd, optional_actions, termios_p)
- int fd;
- int optional_actions;
- const struct termios *termios_p;
-{
- struct __sysv_termio buf;
- int ioctl_function;
- size_t i;
-
- if (termios_p == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
- switch (optional_actions)
- {
- case TCSANOW:
- ioctl_function = _TCSETA;
- break;
- case TCSADRAIN:
- ioctl_function = _TCSETAW;
- break;
- case TCSAFLUSH:
- ioctl_function = _TCSETAF;
- break;
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- if (termios_p->__ispeed != termios_p->__ospeed)
- {
- __set_errno (EINVAL);
- return -1;
- }
- buf.c_cflag = -1;
- for (i = 0; i <= sizeof (__unix_speeds) / sizeof (__unix_speeds[0]); ++i)
- {
- if (__unix_speeds[i] == termios_p->__ispeed)
- buf.c_cflag = i;
- }
- if (buf.c_cflag == -1)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- buf.c_iflag = 0;
- if (termios_p->c_iflag & IGNBRK)
- buf.c_iflag |= _SYSV_IGNBRK;
- if (termios_p->c_iflag & BRKINT)
- buf.c_iflag |= _SYSV_BRKINT;
- if (termios_p->c_iflag & IGNPAR)
- buf.c_iflag |= _SYSV_IGNPAR;
- if (termios_p->c_iflag & PARMRK)
- buf.c_iflag |= _SYSV_PARMRK;
- if (termios_p->c_iflag & INPCK)
- buf.c_iflag |= _SYSV_INPCK;
- if (termios_p->c_iflag & ISTRIP)
- buf.c_iflag |= _SYSV_ISTRIP;
- if (termios_p->c_iflag & INLCR)
- buf.c_iflag |= _SYSV_INLCR;
- if (termios_p->c_iflag & IGNCR)
- buf.c_iflag |= _SYSV_IGNCR;
- if (termios_p->c_iflag & ICRNL)
- buf.c_iflag |= _SYSV_ICRNL;
- if (termios_p->c_iflag & IXON)
- buf.c_iflag |= _SYSV_IXON;
- if (termios_p->c_iflag & IXOFF)
- buf.c_iflag |= _SYSV_IXOFF;
- if (termios_p->c_iflag & IXANY)
- buf.c_iflag |= _SYSV_IXANY;
- if (termios_p->c_iflag & IMAXBEL)
- buf.c_iflag |= _SYSV_IMAXBEL;
-
- buf.c_oflag = 0;
- if (termios_p->c_oflag & OPOST)
- buf.c_oflag |= _SYSV_OPOST;
- if (termios_p->c_oflag & ONLCR)
- buf.c_oflag |= _SYSV_ONLCR;
-
- /* So far, buf.c_cflag contains the speed in CBAUD. */
- if (termios_p->c_cflag & CSTOPB)
- buf.c_cflag |= _SYSV_CSTOPB;
- if (termios_p->c_cflag & CREAD)
- buf.c_cflag |= _SYSV_CREAD;
- if (termios_p->c_cflag & PARENB)
- buf.c_cflag |= _SYSV_PARENB;
- if (termios_p->c_cflag & PARODD)
- buf.c_cflag |= _SYSV_PARODD;
- if (termios_p->c_cflag & HUPCL)
- buf.c_cflag |= _SYSV_HUPCL;
- if (termios_p->c_cflag & CLOCAL)
- buf.c_cflag |= _SYSV_CLOCAL;
- switch (termios_p->c_cflag & CSIZE)
- {
- case CS5:
- buf.c_cflag |= _SYSV_CS5;
- break;
- case CS6:
- buf.c_cflag |= _SYSV_CS6;
- break;
- case CS7:
- buf.c_cflag |= _SYSV_CS7;
- break;
- case CS8:
- buf.c_cflag |= _SYSV_CS8;
- break;
- }
-
- buf.c_lflag = 0;
- if (termios_p->c_lflag & ISIG)
- buf.c_lflag |= _SYSV_ISIG;
- if (termios_p->c_lflag & ICANON)
- buf.c_lflag |= _SYSV_ICANON;
- if (termios_p->c_lflag & ECHO)
- buf.c_lflag |= _SYSV_ECHO;
- if (termios_p->c_lflag & ECHOE)
- buf.c_lflag |= _SYSV_ECHOE;
- if (termios_p->c_lflag & ECHOK)
- buf.c_lflag |= _SYSV_ECHOK;
- if (termios_p->c_lflag & ECHONL)
- buf.c_lflag |= _SYSV_ECHONL;
- if (termios_p->c_lflag & NOFLSH)
- buf.c_lflag |= _SYSV_NOFLSH;
- if (termios_p->c_lflag & TOSTOP)
- buf.c_lflag |= _SYSV_TOSTOP;
- if (termios_p->c_lflag & ECHOCTL)
- buf.c_lflag |= _SYSV_ECHOCTL;
- if (termios_p->c_lflag & ECHOPRT)
- buf.c_lflag |= _SYSV_ECHOPRT;
- if (termios_p->c_lflag & ECHOKE)
- buf.c_lflag |= _SYSV_ECHOKE;
- if (termios_p->c_lflag & FLUSHO)
- buf.c_lflag |= _SYSV_FLUSHO;
- if (termios_p->c_lflag & PENDIN)
- buf.c_lflag |= _SYSV_PENDIN;
- if (termios_p->c_lflag & IEXTEN)
- buf.c_lflag |= _SYSV_IEXTEN;
-
- buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR];
- buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT];
- buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE];
- buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL];
- if (buf.c_lflag & _SYSV_ICANON)
- {
- buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF];
- buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL];
- }
- else
- {
- buf.c_cc[_SYSV_VMIN] = termios_p->c_cc[VMIN];
- buf.c_cc[_SYSV_VTIME] = termios_p->c_cc[VTIME];
- }
- buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2];
-
- if (__ioctl (fd, ioctl_function, &buf) < 0)
- return -1;
- return 0;
-}
-libc_hidden_def (tcsetattr)
diff --git a/libc/sysdeps/unix/xmknod.c b/libc/sysdeps/unix/xmknod.c
deleted file mode 100644
index 8a61bfaf8..000000000
--- a/libc/sysdeps/unix/xmknod.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software 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 <sys/types.h>
-#include <sys/stat.h>
-
-extern int __syscall_mknod (const char *, mode_t, dev_t);
-
-/* Create a device file named PATH, with permission and special bits MODE
- and device number DEV (which can be constructed from major and minor
- device numbers with the `makedev' macro above). */
-int
-__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
-{
- if (vers != _MKNOD_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __syscall_mknod (path, mode, *dev);
-}
-
-weak_alias (__xmknod, _xmknod)
-libc_hidden_def (__xmknod)
diff --git a/libc/sysdeps/x86_64/bits/byteswap-16.h b/libc/sysdeps/x86_64/bits/byteswap-16.h
new file mode 100644
index 000000000..584eb86b7
--- /dev/null
+++ b/libc/sysdeps/x86_64/bits/byteswap-16.h
@@ -0,0 +1,49 @@
+/* Macros to swap the order of bytes in 16-bit integer values.
+ 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_BYTESWAP_H
+# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
+#endif
+
+#ifdef __GNUC__
+# if __GNUC__ >= 2
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
+ if (__builtin_constant_p (__x)) \
+ __v = __bswap_constant_16 (__x); \
+ else \
+ __asm__ ("rorw $8, %w0" \
+ : "=r" (__v) \
+ : "0" (__x) \
+ : "cc"); \
+ __v; }))
+# else
+/* This is better than nothing. */
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ register unsigned short int __x = (unsigned short int) (x); \
+ __bswap_constant_16 (__x); }))
+# endif
+#else
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
+#endif
diff --git a/libc/sysdeps/x86_64/bits/byteswap.h b/libc/sysdeps/x86_64/bits/byteswap.h
index 5094a0540..417843933 100644
--- a/libc/sysdeps/x86_64/bits/byteswap.h
+++ b/libc/sysdeps/x86_64/bits/byteswap.h
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010, 2011
- 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
@@ -24,78 +23,75 @@
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
+#include <features.h>
#include <bits/wordsize.h>
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_16(x) \
- (__extension__ \
- ({ register unsigned short int __v, __x = (unsigned short int) (x); \
- if (__builtin_constant_p (__x)) \
- __v = __bswap_constant_16 (__x); \
- else \
- __asm__ ("rorw $8, %w0" \
- : "=r" (__v) \
- : "0" (__x) \
- : "cc"); \
- __v; }))
-#else
-/* This is better than nothing. */
-# define __bswap_16(x) \
- (__extension__ \
- ({ register unsigned short int __x = (unsigned short int) (x); \
- __bswap_constant_16 (__x); }))
-#endif
-
+/* Get __bswap_16. */
+#include <bits/byteswap-16.h>
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
-#if defined __GNUC__ && __GNUC__ >= 2
-# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
- || defined __pentiumpro__ || defined __pentium4__ \
- || defined __k8__ || defined __athlon__ \
- || defined __k6__ || defined __nocona__ \
- || defined __core2__ || defined __geode__ \
- || defined __amdfam10__)
+#ifdef __GNUC__
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+ return __builtin_bswap32 (__bsx);
+}
+# elif __GNUC__ >= 2
+# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
+ || defined __pentiumpro__ || defined __pentium4__ \
+ || defined __k8__ || defined __athlon__ \
+ || defined __k6__ || defined __nocona__ \
+ || defined __core2__ || defined __geode__ \
+ || defined __amdfam10__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
-# define __bswap_32(x) \
- (__extension__ \
- ({ register unsigned int __v, __x = (x); \
- if (__builtin_constant_p (__x)) \
- __v = __bswap_constant_32 (__x); \
- else \
- __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \
- __v; }))
+# define __bswap_32(x) \
+ (__extension__ \
+ ({ register unsigned int __v, __x = (x); \
+ if (__builtin_constant_p (__x)) \
+ __v = __bswap_constant_32 (__x); \
+ else \
+ __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \
+ __v; }))
+# else
+# define __bswap_32(x) \
+ (__extension__ \
+ ({ register unsigned int __v, __x = (x); \
+ if (__builtin_constant_p (__x)) \
+ __v = __bswap_constant_32 (__x); \
+ else \
+ __asm__ ("rorw $8, %w0;" \
+ "rorl $16, %0;" \
+ "rorw $8, %w0" \
+ : "=r" (__v) \
+ : "0" (__x) \
+ : "cc"); \
+ __v; }))
+# endif
# else
-# define __bswap_32(x) \
+# define __bswap_32(x) \
(__extension__ \
- ({ register unsigned int __v, __x = (x); \
- if (__builtin_constant_p (__x)) \
- __v = __bswap_constant_32 (__x); \
- else \
- __asm__ ("rorw $8, %w0;" \
- "rorl $16, %0;" \
- "rorw $8, %w0" \
- : "=r" (__v) \
- : "0" (__x) \
- : "cc"); \
- __v; }))
+ ({ register unsigned int __x = (x); __bswap_constant_32 (__x); }))
# endif
#else
-# define __bswap_32(x) \
- (__extension__ \
- ({ register unsigned int __x = (x); __bswap_constant_32 (__x); }))
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+ return __bswap_constant_32 (__bsx);
+}
#endif
-#if defined __GNUC__ && __GNUC__ >= 2
+#if __GNUC_PREREQ (2, 0)
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
@@ -107,7 +103,13 @@
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56)))
-# if __WORDSIZE == 64
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __builtin_bswap64 (__bsx);
+}
+# elif __WORDSIZE == 64
# define __bswap_64(x) \
(__extension__ \
({ register unsigned long __v, __x = (x); \
@@ -131,6 +133,22 @@
} \
__r.__ll; }))
# endif
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
diff --git a/libc/sysdeps/x86_64/bits/wordsize.h b/libc/sysdeps/x86_64/bits/wordsize.h
index a40a0d816..9b38756fd 100644
--- a/libc/sysdeps/x86_64/bits/wordsize.h
+++ b/libc/sysdeps/x86_64/bits/wordsize.h
@@ -1,6 +1,6 @@
/* Determine the wordsize from the preprocessor defines. */
-#if defined __x86_64__
+#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
# define __WORDSIZE_COMPAT32 1
#else
diff --git a/libc/sysdeps/x86_64/ffsll.c b/libc/sysdeps/x86_64/ffsll.c
index a7a5dc858..0c07dcec0 100644
--- a/libc/sysdeps/x86_64/ffsll.c
+++ b/libc/sysdeps/x86_64/ffsll.c
@@ -36,7 +36,7 @@ ffsll (long long int x)
return cnt + 1;
}
-#ifdef __LP64__
+#ifndef __ILP32__
#undef ffsl
weak_alias (ffsll, ffsl)
#endif
diff --git a/libc/sysdeps/x86_64/fpu/s_ilogbl.S b/libc/sysdeps/x86_64/fpu/e_ilogbl.S
index f59040c11..ae6c0fe6f 100644
--- a/libc/sysdeps/x86_64/fpu/s_ilogbl.S
+++ b/libc/sysdeps/x86_64/fpu/e_ilogbl.S
@@ -7,7 +7,7 @@
#include <machine/asm.h>
-ENTRY(__ilogbl)
+ENTRY(__ieee754_ilogbl)
fldt 8(%rsp)
/* I added the following ugly construct because ilogb(+-Inf) is
required to return INT_MAX in ISO C99.
@@ -18,6 +18,8 @@ ENTRY(__ilogbl)
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
+ cmpb $0x40, %dh
+ je 2f /* Is +-Inf, jump. */
fxtract
fstp %st
@@ -31,5 +33,7 @@ ENTRY(__ilogbl)
1: fstp %st
movl $0x7fffffff, %eax
ret
-END (__ilogbl)
-weak_alias (__ilogbl, ilogbl)
+2: fstp %st
+ movl $0x80000000, %eax /* FP_ILOGB0 */
+ ret
+END (__ieee754_ilogbl)
diff --git a/libc/sysdeps/x86_64/fpu/e_powl.S b/libc/sysdeps/x86_64/fpu/e_powl.S
index 0626ce417..10ede2264 100644
--- a/libc/sysdeps/x86_64/fpu/e_powl.S
+++ b/libc/sysdeps/x86_64/fpu/e_powl.S
@@ -35,6 +35,9 @@ p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_TYPE_DIRECTIVE(p64,@object)
p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(p64)
+ ASM_TYPE_DIRECTIVE(p78,@object)
+p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
+ ASM_SIZE_DIRECTIVE(p78)
.section .rodata.cst16,"aM",@progbits,16
@@ -151,6 +154,21 @@ ENTRY(__ieee754_powl)
fxch // x : y
fabs // |x| : y
fxch // y : |x|
+ // If y has absolute value at least 1L<<78, then any finite
+ // nonzero x will result in 0 (underflow), 1 or infinity (overflow).
+ // Saturate y to those bounds to avoid overflow in the calculation
+ // of y*log2(x).
+ fldl MO(p78) // 1L<<78 : y : |x|
+ fld %st(1) // y : 1L<<78 : y : |x|
+ fabs // |y| : 1L<<78 : y : |x|
+ fcomip %st(1), %st // 1L<<78 : y : |x|
+ fstp %st(0) // y : |x|
+ jc 3f
+ fstp %st(0) // pop y
+ fldl MO(p78) // 1L<<78 : |x|
+ testb $2, %dl
+ jz 3f // y > 0
+ fchs // -(1L<<78) : |x|
.align ALIGNARG(4)
3: /* y is a real number. */
fxch // x : y
@@ -170,11 +188,6 @@ ENTRY(__ieee754_powl)
7: fyl2x // log2(x) : y
8: fmul %st(1) // y*log2(x) : y
- fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x05, %ah // is y*log2(x) == ±inf ?
- je 28f
fst %st(1) // y*log2(x) : y*log2(x)
frndint // int(y*log2(x)) : y*log2(x)
fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
@@ -183,13 +196,7 @@ ENTRY(__ieee754_powl)
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
- jmp 29f
-
-28: fstp %st(1) // y*log2(x)
- fldl MO(one) // 1 : y*log2(x)
- fscale // 2^(y*log2(x)) : y*log2(x)
- fstp %st(1) // 2^(y*log2(x))
-29: testb $2, %dh
+ testb $2, %dh
jz 292f
// x is negative. If y is an odd integer, negate the result.
fldt 24(%rsp) // y : abs(result)
diff --git a/libc/sysdeps/x86_64/fpu/libm-test-ulps b/libc/sysdeps/x86_64/fpu/libm-test-ulps
index d43955aff..c700bdf74 100644
--- a/libc/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/libc/sysdeps/x86_64/fpu/libm-test-ulps
@@ -550,6 +550,9 @@ ldouble: 1
Test "Real part of: clog (0x1.fffffep+127 + 0x1.fffffep+127 i) == 89.06941264234832570836679262104313101776 + pi/4 i":
ildouble: 1
ldouble: 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+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i":
ildouble: 1
ldouble: 1
@@ -653,6 +656,9 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 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
@@ -1011,11 +1017,15 @@ ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
ildouble: 2
ldouble: 2
@@ -1029,6 +1039,26 @@ idouble: 1
ifloat: 1
ildouble: 3
ldouble: 3
+Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
+ildouble: 2
+ldouble: 2
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -1039,19 +1069,51 @@ ifloat: 2
ildouble: 3
ldouble: 3
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
+ildouble: 2
+ldouble: 2
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
@@ -1444,6 +1506,17 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
ifloat: 1
+# pow
+Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416":
+float: 1
+ifloat: 1
+Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744":
+float: 1
+ifloat: 1
+Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141":
+float: 1
+ifloat: 1
+
# pow_downward
Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674":
ildouble: 1
@@ -2289,34 +2362,36 @@ ldouble: 1
Function: Real part of "ctan":
double: 1
+float: 1
idouble: 1
-ildouble: 1
-ldouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "ctan":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "ctanh":
double: 1
-float: 2
-idouble: 1
-ifloat: 2
-ildouble: 3
-ldouble: 3
-
-Function: Imaginary part of "ctanh":
-double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Function: Imaginary part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
Function: "erf":
double: 1
idouble: 1
@@ -2413,6 +2488,10 @@ Function: "log1p":
float: 1
ifloat: 1
+Function: "pow":
+float: 1
+ifloat: 1
+
Function: "pow_downward":
float: 1
ifloat: 1
diff --git a/libc/sysdeps/x86_64/memset.S b/libc/sysdeps/x86_64/memset.S
index 7be907192..9511745a4 100644
--- a/libc/sysdeps/x86_64/memset.S
+++ b/libc/sysdeps/x86_64/memset.S
@@ -1,6 +1,6 @@
/* memset/bzero -- set memory area to CH/0
Optimized version for x86-64.
- Copyright (C) 2002-2005, 2007, 2008, 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
@@ -52,7 +52,7 @@ L(ck2):
imul %r9,%rdx
L(now_dw_aligned):
cmp $0x90,%r8
- jg L(ck_mem_ops_method)
+ ja L(ck_mem_ops_method)
L(now_dw_aligned_small):
add %r8,%rdi
#ifndef PIC
@@ -604,7 +604,7 @@ L(aligned_now):
punpcklqdq %xmm0,%xmm0
cmp $0xb0,%r8 # 176
- jge L(byte32sse2_pre)
+ jae L(byte32sse2_pre)
add %r8,%rdi
# ifndef PIC
@@ -864,7 +864,7 @@ L(byte32sse2_pre):
mov __x86_64_shared_cache_size(%rip),%r9d # The largest cache size
cmp %r9,%r8
- jg L(sse2_nt_move_pre)
+ ja L(sse2_nt_move_pre)
#jmp L(byte32sse2)
.balign 16
L(byte32sse2):
@@ -880,7 +880,7 @@ L(byte32sse2):
movdqa %xmm0,0x70(%rdi)
lea 0x80(%rdi),%rdi
- jge L(byte32sse2)
+ jae L(byte32sse2)
add %r8,%rdi
# ifndef PIC
lea L(SSExDx)(%rip),%r11
@@ -914,7 +914,7 @@ L(sse2_nt_move):
movntdq %xmm0,0x70(%rdi)
lea 0x80(%rdi),%rdi
- jge L(sse2_nt_move)
+ jae L(sse2_nt_move)
sfence
add %r8,%rdi
# ifndef PIC
diff --git a/libc/sysdeps/x86_64/memset_chk.S b/libc/sysdeps/x86_64/memset_chk.S
index 16f1fde16..862e27563 100644
--- a/libc/sysdeps/x86_64/memset_chk.S
+++ b/libc/sysdeps/x86_64/memset_chk.S
@@ -1,5 +1,5 @@
/* Checking memset for x86-64.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 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
@@ -19,7 +19,7 @@
#include <sysdep.h>
#include "asm-syntax.h"
-#ifndef PIC
+#ifndef SHARED
/* For libc.so this is defined in memset.S.
For libc.a, this is a separate source to avoid
memset bringing in __chk_fail and all routines
diff --git a/libc/sysdeps/x86_64/preconfigure b/libc/sysdeps/x86_64/preconfigure
index 48ba6a151..ca9de7584 100644
--- a/libc/sysdeps/x86_64/preconfigure
+++ b/libc/sysdeps/x86_64/preconfigure
@@ -133,7 +133,7 @@ if ${libc_cv_x32+:} false; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __LP64__
+#ifndef __ILP32__
# error not x32
#endif
int
diff --git a/libc/sysdeps/x86_64/preconfigure.in b/libc/sysdeps/x86_64/preconfigure.in
index 1f049c7a0..600700ea1 100644
--- a/libc/sysdeps/x86_64/preconfigure.in
+++ b/libc/sysdeps/x86_64/preconfigure.in
@@ -8,7 +8,7 @@ x86_64)
AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default,
libc_cv_x32, [dnl
AC_TRY_COMPILE(dnl
-[#ifdef __LP64__
+[#ifndef __ILP32__
# error not x32
#endif], [], libc_cv_x32=yes, libc_cv_x32=no)])
if test $libc_cv_x32 = yes; then
diff --git a/libc/time/time.h b/libc/time/time.h
index 775c0927e..776dc401a 100644
--- a/libc/time/time.h
+++ b/libc/time/time.h
@@ -120,7 +120,7 @@ typedef __timer_t timer_t;
struct timespec
{
__time_t tv_sec; /* Seconds. */
- long int tv_nsec; /* Nanoseconds. */
+ __snseconds_t tv_nsec; /* Nanoseconds. */
};
#endif /* timespec not defined and <time.h> or need timespec. */
diff --git a/libc/time/tst-mktime2.c b/libc/time/tst-mktime2.c
index 0e4fd1e78..bc7cc5818 100644
--- a/libc/time/tst-mktime2.c
+++ b/libc/time/tst-mktime2.c
@@ -1,4 +1,6 @@
/* Test program from Paul Eggert and Tony Leneis. */
+
+#include <limits.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/libc/wcsmbs/Makefile b/libc/wcsmbs/Makefile
index 60172ef04..1d8dd3831 100644
--- a/libc/wcsmbs/Makefile
+++ b/libc/wcsmbs/Makefile
@@ -54,7 +54,8 @@ tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1
tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
+= tst-wcstof wcsmbs-tst1 tst-wcsnlen \
- tst-wcpncpy tst-mbsrtowcs wcsatcliff $(addprefix test-,$(strop-tests))
+ tst-wcpncpy tst-mbsrtowcs tst-mbsnrtowcs \
+ wcsatcliff $(addprefix test-,$(strop-tests))
include ../Rules
@@ -94,3 +95,4 @@ tst-mbrtowc-ENV = LOCPATH=$(common-objpfx)localedata
tst-wcrtomb-ENV = LOCPATH=$(common-objpfx)localedata
tst-mbrtowc2-ENV = LOCPATH=$(common-objpfx)localedata
tst-c16c32-1-ENV = LOCPATH=$(common-objpfx)localedata
+tst-mbsnrtowcs-ENV = LOCPATH=$(common-objpfx)localedata
diff --git a/libc/wcsmbs/tst-mbsnrtowcs.c b/libc/wcsmbs/tst-mbsnrtowcs.c
new file mode 100644
index 000000000..29ff7c26a
--- /dev/null
+++ b/libc/wcsmbs/tst-mbsnrtowcs.c
@@ -0,0 +1,83 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>,
+ 2012.
+
+ 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 bugzilla 13691 */
+
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+#include <locale.h>
+
+static int
+do_test (void)
+{
+ const char * in = "A";
+ const char *inbuf = in;
+ size_t inlen = strchr (in, '\0') - inbuf;
+
+ wchar_t out[5];
+ mbstate_t ps;
+
+ const char *locale = "vi_VN.TCVN5712-1";
+ if (!setlocale (LC_ALL, locale))
+ {
+ printf ("Locale not available.\n");
+ return 1;
+ }
+
+ memset (&ps, '\0', sizeof (ps));
+ memset (out, '\0', sizeof (out));
+
+ /* If the bug isn't fixed, it isn't going to return from mbsnrtowcs due to
+ an assert(). */
+ size_t n = mbsnrtowcs (out, &inbuf, inlen, sizeof(out) - 1, &ps);
+
+ int result = 0;
+
+ if (n != 1)
+ {
+ printf ("n = %zu, expected 1\n", n);
+ result = 1;
+ }
+
+ int i;
+ printf ("in = ");
+ for (i = 0; i < inlen; i++)
+ {
+ printf ("0x%X ", in[i]);
+ }
+ printf ("\n");
+
+ char * outb = (char *) out;
+ printf ("out =");
+ for (i = 0; i < sizeof (out); i++)
+ {
+ if (i % 4 == 0)
+ {
+ printf (" 0x");
+ }
+ printf ("%X", outb[i]);
+ }
+ printf ("\n");
+
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 491cc920e..908d0bd27 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,288 @@
+2012-04-21 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13556]
+ * sysdeps/arm/shlib-versions (arm.*-.*-linux.*): Remove old-ABI
+ entry.
+ * sysdeps/arm/start.S: Remove __ARM_EABI__ conditionals.
+ * sysdeps/arm/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/arm/clone.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Likewise.
+ * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise.
+ * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
+
+ [BZ #13556]
+ * sysdeps/arm/preconfigure: Don't include /eabi in $machine.
+ * sysdeps/arm/Makefile [subdir = elf] (sysdep_routines): Add
+ setting from eabi/Makefile.
+ [subdir = elf] (sysdep-rtld-routines): Likewise.
+ [subdir = elf] (shared-only-routines): Likewise.
+ [subdir = csu] (gen-as-const-headers): Likewise.
+ [subdir = csu] (aeabi_constants): Likewise.
+ [subdir = csu] (aeabi_routines): Likewise.
+ [subdir = csu] (sysdep_routines): Likewise.
+ [subdir = csu] (static-only-routines): Likewise.
+ [subdir = gmon] (sysdep_routines): Likewise.
+ [subdir = debug] (CFLAGS-backtrace.c): Likewise.
+ [subdir = math] ($(objpfx)libm.so): Add dependency from
+ eabi/Makefile.
+ * sysdeps/arm/eabi/Makefile: Remove.
+ * sysdeps/arm/eabi/Versions: Move to ...
+ * sysdeps/arm/Versions: ... here.
+ * sysdeps/arm/eabi/__longjmp.S: Move to ...
+ * sysdeps/arm/__longjmp.S: ... here.
+ * sysdeps/arm/eabi/abi-note.S: Move to ...
+ * sysdeps/arm/abi-note.S: ... here.
+ * sysdeps/arm/eabi/aeabi_assert.c: Move to ...
+ * sysdeps/arm/aeabi_assert.c: ... here.
+ * sysdeps/arm/eabi/aeabi_atexit.c: Move to ...
+ * sysdeps/arm/aeabi_atexit.c: ... here.
+ * sysdeps/arm/eabi/aeabi_errno_addr.c: Move to ...
+ * sysdeps/arm/aeabi_errno_addr.c: ... here.
+ * sysdeps/arm/eabi/aeabi_lcsts.c: Move to ...
+ * sysdeps/arm/aeabi_lcsts.c: ... here.
+ * sysdeps/arm/eabi/aeabi_localeconv.c: Move to ...
+ * sysdeps/arm/aeabi_localeconv.c: ... here.
+ * sysdeps/arm/eabi/aeabi_math.c: Move to ...
+ * sysdeps/arm/aeabi_math.c: ... here.
+ * sysdeps/arm/eabi/aeabi_mb_cur_max.c: Move to ...
+ * sysdeps/arm/aeabi_mb_cur_max.c: ... here.
+ * sysdeps/arm/eabi/aeabi_memclr.c: Move to ...
+ * sysdeps/arm/aeabi_memclr.c: ... here.
+ * sysdeps/arm/eabi/aeabi_memcpy.c: Move to ...
+ * sysdeps/arm/aeabi_memcpy.c: ... here.
+ * sysdeps/arm/eabi/aeabi_memmove.c: Move to ...
+ * sysdeps/arm/aeabi_memmove.c: ... here.
+ * sysdeps/arm/eabi/aeabi_memset.c: Move to ...
+ * sysdeps/arm/aeabi_memset.c: ... here.
+ * sysdeps/arm/eabi/aeabi_sighandlers.S: Move to ...
+ * sysdeps/arm/aeabi_sighandlers.S: ... here.
+ * sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c: Move to ...
+ * sysdeps/arm/aeabi_unwind_cpp_pr1.c: ... here.
+ * sysdeps/arm/eabi/arm-mcount.S: Move to ...
+ * sysdeps/arm/arm-mcount.S: ... here.
+ * sysdeps/arm/eabi/backtrace.c: Move to ...
+ * sysdeps/arm/backtrace.c: ... here.
+ * sysdeps/arm/eabi/fclrexcpt.c: Move to ...
+ * sysdeps/arm/fclrexcpt.c: ... here.
+ * sysdeps/arm/eabi/fedisblxcpt.c: Move to ...
+ * sysdeps/arm/fedisblxcpt.c: ... here.
+ * sysdeps/arm/eabi/feenablxcpt.c: Move to ...
+ * sysdeps/arm/feenablxcpt.c: ... here.
+ * sysdeps/arm/eabi/fegetenv.c: Move to ...
+ * sysdeps/arm/fegetenv.c: ... here.
+ * sysdeps/arm/eabi/fegetexcept.c: Move to ...
+ * sysdeps/arm/fegetexcept.c: ... here.
+ * sysdeps/arm/eabi/fegetround.c: Move to ...
+ * sysdeps/arm/fegetround.c: ... here.
+ * sysdeps/arm/eabi/feholdexcpt.c: Move to ...
+ * sysdeps/arm/feholdexcpt.c: ... here.
+ * sysdeps/arm/eabi/fesetenv.c: Move to ...
+ * sysdeps/arm/fesetenv.c: ... here.
+ * sysdeps/arm/eabi/fesetround.c: Move to ...
+ * sysdeps/arm/fesetround.c: ... here.
+ * sysdeps/arm/eabi/feupdateenv.c: Move to ...
+ * sysdeps/arm/feupdateenv.c: ... here.
+ * sysdeps/arm/eabi/fgetexcptflg.c: Move to ...
+ * sysdeps/arm/fgetexcptflg.c: ... here.
+ * sysdeps/arm/eabi/find_exidx.c: Move to ...
+ * sysdeps/arm/find_exidx.c: ... here.
+ * sysdeps/arm/eabi/fpu_control.h: Move to ...
+ * sysdeps/arm/fpu_control.h: ... here.
+ * sysdeps/arm/eabi/fraiseexcpt.c: Move to ...
+ * sysdeps/arm/fraiseexcpt.c: ... here.
+ * sysdeps/arm/eabi/fsetexcptflg.c: Move to ...
+ * sysdeps/arm/fsetexcptflg.c: ... here.
+ * sysdeps/arm/eabi/ftestexcept.c: Move to ...
+ * sysdeps/arm/ftestexcept.c: ... here.
+ * sysdeps/arm/eabi/jmpbuf-offsets.h: Move to ...
+ * sysdeps/arm/jmpbuf-offsets.h: ... here.
+ * sysdeps/arm/eabi/machine-gmon.h: Move to ...
+ * sysdeps/arm/machine-gmon.h: ... here.
+ * sysdeps/arm/eabi/rtld-global-offsets.sym: Move to ...
+ * sysdeps/arm/rtld-global-offsets.sym: ... here.
+ * sysdeps/arm/eabi/setfpucw.c: Move to ...
+ * sysdeps/arm/setfpucw.c: ... here.
+ * sysdeps/arm/eabi/setjmp.S: Move to ...
+ * sysdeps/arm/setjmp.S: ... here.
+ * sysdeps/arm/eabi/armv6t2/memchr.S: Move to ...
+ * sysdeps/arm/armv6t2/memchr.S: ... here.
+ * sysdeps/arm/eabi/armv7/Implies: Move to ...
+ * sysdeps/arm/armv7/Implies: ... here. Remove /eabi from implied
+ directory.
+ * sysdeps/arm/eabi/bits/fenv.h: Move to ...
+ * sysdeps/arm/bits/fenv.h: ... here.
+ * sysdeps/arm/eabi/bits/huge_val.h: Move to ...
+ * sysdeps/arm/bits/huge_val.h: ... here.
+ * sysdeps/arm/eabi/bits/setjmp.h: Move to ...
+ * sysdeps/arm/bits/setjmp.h: ... here.
+ * sysdeps/unix/sysv/linux/arm/getcontext.S: Update directory name
+ in comment.
+ * sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise.
+
+ [BZ #13556]
+ * sysdeps/unix/sysv/linux/arm/socket.S: Remove.
+ * sysdeps/unix/sysv/linux/arm/syscalls.list (syscall): Remove.
+ (oldgetrlimit): Likewise.
+ (oldsetrlimit): Likewise.
+ (syscall): Likewise.
+ (msgget): Add syscall from eabi/syscalls.list.
+ (msgrcv): Likewise.
+ (msgsnd): Likewise.
+ (shmat): Likewise.
+ (shmdt): Likewise.
+ (shmget): Likewise.
+ (semop): Likewise.
+ (semtimedop): Likewise.
+ (semget): Likewise.
+ (accept): Likewise.
+ (bind): Likewise.
+ (connect): Likewise.
+ (getpeername): Likewise.
+ (getsockname): Likewise.
+ (getsockopt): Likewise.
+ (listen): Likewise.
+ (recv): Likewise.
+ (recvfrom): Likewise.
+ (recvmsg): Likewise.
+ (send): Likewise.
+ (sendmsg): Likewise.
+ (sendto): Likewise.
+ (setsockopt): Likewise.
+ (shutdown): Likewise.
+ (socket): Likewise.
+ (socketpair): Likewise.
+ * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove.
+ * sysdeps/unix/sysv/linux/arm/Makefile [subdir = csu]
+ (CFLAGS-libc-start.c): Add setting from eabi/Makefile.
+ [subdir = rt] (librt-sysdep_routines): Likewise.
+ [subdir = rt] (librt-shared-only-routines): Likewise.
+ [subdir = nptl] (libpthread-sysdep_routines): Likewise.
+ [subdir = nptl] (libpthread-shared-only-routines): Likewise.
+ [subdir = resolv] (libanl-sysdep_routines): Likewise.
+ [subdir = resolv] (libanl-shared-only-routines): Likewise.
+ [subdir = csu] (sysdep_routines): Likewise.
+ [subdir = nscd] (nscd-modules): Likewise.
+ [subdir = nss] (libnss_db-sysdep_routines): Likewise.
+ [subdir = nss] (libnss_db-shared-only-routines): Likewise.
+ [subdir = posix] (LDFLAGS-tst-rfc3484): Likewise.
+ [subdir = posix] (LDFLAGS-tst-rfc3484-2): Likewise.
+ [subdir = posix] (LDFLAGS-tst-rfc3484-3): Likewise.
+ * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Remove.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (__NR_SYSCALL_BASE): Add
+ test from eabi/sysdep.h.
+ (__NR_stime): Add #undef from eabi/sysdep.h.
+ (__NR_alarm): Likewise.
+ (DO_CALL): Use definition from eabi/sysdep.h.
+ (DOARGS_0): Likewise.
+ (DOARGS_1): Likewise.
+ (DOARGS_2): Likewise.
+ (DOARGS_3): Likewise.
+ (DOARGS_4): Likewise.
+ (DOARGS_5): Likewise.
+ (DOARGS_6): Likewise.
+ (DOARGS_7): Likewise.
+ (UNDOARGS_0): Likewise.
+ (UNDOARGS_1): Likewise.
+ (UNDOARGS_2): Likewise.
+ (UNDOARGS_3): Likewise.
+ (UNDOARGS_4): Likewise.
+ (UNDOARGS_5): Likewise.
+ (UNDOARGS_6): Likewise.
+ (UNDOARGS_7): Likewise.
+ (INTERNAL_SYSCALL_RAW): Likewise.
+ [__thumb__] (LOAD_ARGS_7): Do not define.
+ [__thumb__] (ASM_ARGS_7): Likewise.
+ (INTERNAL_SYSCALL_NCS): Use definition from eabi/sysdep.h.
+ (INTERNAL_SYSCALL_NCS_0): Remove.
+ (INTERNAL_SYSCALL_NCS_1): Likewise.
+ (INTERNAL_SYSCALL_NCS_2): Likewise.
+ (INTERNAL_SYSCALL_NCS_3): Likewise.
+ (INTERNAL_SYSCALL_NCS_4): Likewise.
+ (INTERNAL_SYSCALL_NCS_5): Likewise.
+ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Remove.
+ * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Move to ...
+ * sysdeps/unix/sysv/linux/arm/configure.in: ... here. Update
+ comment.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure: Move to ...
+ * sysdeps/unix/sysv/linux/arm/configure: ... here. Regenerate.
+ * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/ftruncate64.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/getcontext.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/internal_accept4.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/makecontext.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/mmap64.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/mmap64.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/msgctl.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/oldgetrlimit.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/oldsetrlimit.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/pread.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/pread.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/pread64.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/pread64.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/pwrite.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/pwrite.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/pwrite64.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/readahead.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/readahead.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/semctl.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/semctl.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/setcontext.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/shmctl.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/shmctl.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/sigrestorer.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/swapcontext.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/syscall.S: Move to ...
+ * sysdeps/unix/sysv/linux/arm/syscall.S: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/truncate64.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/umount.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/umount.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/Makefile: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/configure.in: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/configure: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/configure: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c:
+ Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c:
+ ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c:
+ Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c:
+ Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: ... here.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind.h: ... here.
+
+2012-04-16 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Undefine
+ MORE_ELF_HEADER_DATA to avoid warnings about redefinition.
+
2012-03-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/mman.h (MAP_STACK): Define.
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 700c78fe0..0c7446e92 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,3 +1,28 @@
+2012-04-17 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-irel.h: New file.
+
+2012-04-17 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-fptr.h: Add prototype for _dl_fptr_init.
+ * sysdeps/hppa/dl-fptr.c: New file.
+ * sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
+ Call _dl_fptr_init.
+
+2012-04-17 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/elf/configure: Removed file.
+ * sysdeps/hppa/elf/configure.in: Move to...
+ * sysdeps/hppa/configure.in: ... here.
+ * sysdeps/hppa/configure: Regenerate.
+ * sysdeps/hppa/elf/initfini.c: Removed file.
+ * sysdeps/hppa/crti.S: New file.
+ * sysdeps/hppa/crtn.S: New file.
+ * sysdeps/hppa/elf/entry.h: Moved to ...
+ * sysdeps/hppa/entry.h: ... here.
+ * sysdeps/hppa/elf/start.S: Move to ...
+ * sysdeps/hppa/start.S: ... here.
+
2012-03-22 Carlos O'Donell <carlos@systemhalted.org>
[BZ #6730]
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index 8108e001c..dda687edd 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,21 @@
+2012-04-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
+
+2012-04-17 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/m680x0/fpu/e_ilogb.c: Renamed from s_ilogb.c.
+ Define __ieee754_ilogb instead of __ilogb.
+ * sysdeps/m68k/m680x0/fpu/e_ilogbf.c: Renamed from s_ilogbf.c and
+ adjusted.
+ * sysdeps/m68k/m680x0/fpu/e_ilogbl.c: Renamed from s_ilogbl.c and
+ adjusted.
+
+2012-03-28 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MAP_STACK)
+ (MAP_HUGETLB): Define.
+
2012-03-27 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/elf/start.S: Move to ...
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index 01f51c0c4..6e0523de8 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,9 @@
+2012-04-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: Include
+ sysdeps/unix/sysv/linux/arm/readahead.c not
+ sysdeps/unix/sysv/linux/arm/eabi/readahead.c.
+
2012-03-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (MAP_STACK): Define.
diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile
index b48d61401..77e03b58f 100644
--- a/ports/ChangeLog.tile
+++ b/ports/ChangeLog.tile
@@ -1,3 +1,9 @@
+2012-04-15 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h: Include
+ <_itoa.h> instead of <stdio-common/_itoa.h>.
+ * sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h: Likewise.
+
2012-03-09 Richard Henderson <rth@twiddle.net>
* sysdeps/tile/math_private.h: Use include_next to
diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile
index 1a88430a2..69a5a6a11 100644
--- a/ports/sysdeps/arm/Makefile
+++ b/ports/sysdeps/arm/Makefile
@@ -1,14 +1,43 @@
ifeq ($(subdir),elf)
sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += tlsdesc dl-tlsdesc
-sysdep-rtld-routines += tlsdesc dl-tlsdesc
+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
+sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
+shared-only-routines += aeabi_unwind_cpp_pr1
endif
ifeq ($(subdir),csu)
-gen-as-const-headers += tlsdesc.sym
+# get offset to rtld_global._dl_hwcap
+gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
+aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
+aeabi_routines = aeabi_assert aeabi_errno_addr \
+ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+ aeabi_memmove aeabi_memset
+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+aeabi_routines += aeabi_localeconv
+endif
+
+sysdep_routines += $(aeabi_constants) $(aeabi_routines)
+static-only-routines += $(aeabi_constants)
endif
# to pull in __aeabi_read_tp, needed for tls
ifeq ($(subdir),malloc)
$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
endif
+
+ifeq ($(subdir),gmon)
+sysdep_routines += arm-mcount
+endif
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+CFLAGS-tst-backtrace2.c += -funwind-tables
+CFLAGS-tst-backtrace3.c += -funwind-tables
+CFLAGS-tst-backtrace4.c += -funwind-tables
+CFLAGS-tst-backtrace5.c += -funwind-tables
+CFLAGS-tst-backtrace6.c += -funwind-tables
+endif
+
+ifeq ($(subdir),math)
+$(objpfx)libm.so: $(elfobjdir)/ld.so
+endif
diff --git a/ports/sysdeps/arm/eabi/Versions b/ports/sysdeps/arm/Versions
index 5f2af29c3..5f2af29c3 100644
--- a/ports/sysdeps/arm/eabi/Versions
+++ b/ports/sysdeps/arm/Versions
diff --git a/ports/sysdeps/arm/eabi/__longjmp.S b/ports/sysdeps/arm/__longjmp.S
index cc802c15b..cc802c15b 100644
--- a/ports/sysdeps/arm/eabi/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
diff --git a/ports/sysdeps/arm/eabi/abi-note.S b/ports/sysdeps/arm/abi-note.S
index 1060c3d28..1060c3d28 100644
--- a/ports/sysdeps/arm/eabi/abi-note.S
+++ b/ports/sysdeps/arm/abi-note.S
diff --git a/ports/sysdeps/arm/eabi/aeabi_assert.c b/ports/sysdeps/arm/aeabi_assert.c
index c8fb18891..c8fb18891 100644
--- a/ports/sysdeps/arm/eabi/aeabi_assert.c
+++ b/ports/sysdeps/arm/aeabi_assert.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_atexit.c b/ports/sysdeps/arm/aeabi_atexit.c
index 5427fae96..5427fae96 100644
--- a/ports/sysdeps/arm/eabi/aeabi_atexit.c
+++ b/ports/sysdeps/arm/aeabi_atexit.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_errno_addr.c b/ports/sysdeps/arm/aeabi_errno_addr.c
index b9ee3a5fd..b9ee3a5fd 100644
--- a/ports/sysdeps/arm/eabi/aeabi_errno_addr.c
+++ b/ports/sysdeps/arm/aeabi_errno_addr.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_lcsts.c b/ports/sysdeps/arm/aeabi_lcsts.c
index c53800d6c..c53800d6c 100644
--- a/ports/sysdeps/arm/eabi/aeabi_lcsts.c
+++ b/ports/sysdeps/arm/aeabi_lcsts.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_localeconv.c b/ports/sysdeps/arm/aeabi_localeconv.c
index 233dc6204..233dc6204 100644
--- a/ports/sysdeps/arm/eabi/aeabi_localeconv.c
+++ b/ports/sysdeps/arm/aeabi_localeconv.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_math.c b/ports/sysdeps/arm/aeabi_math.c
index d7bcd5671..d7bcd5671 100644
--- a/ports/sysdeps/arm/eabi/aeabi_math.c
+++ b/ports/sysdeps/arm/aeabi_math.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/ports/sysdeps/arm/aeabi_mb_cur_max.c
index 3c03a9ae3..3c03a9ae3 100644
--- a/ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c
+++ b/ports/sysdeps/arm/aeabi_mb_cur_max.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_memclr.c b/ports/sysdeps/arm/aeabi_memclr.c
index e2974520e..e2974520e 100644
--- a/ports/sysdeps/arm/eabi/aeabi_memclr.c
+++ b/ports/sysdeps/arm/aeabi_memclr.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_memcpy.c b/ports/sysdeps/arm/aeabi_memcpy.c
index 403a7ef52..403a7ef52 100644
--- a/ports/sysdeps/arm/eabi/aeabi_memcpy.c
+++ b/ports/sysdeps/arm/aeabi_memcpy.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_memmove.c b/ports/sysdeps/arm/aeabi_memmove.c
index e824946a7..e824946a7 100644
--- a/ports/sysdeps/arm/eabi/aeabi_memmove.c
+++ b/ports/sysdeps/arm/aeabi_memmove.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_memset.c b/ports/sysdeps/arm/aeabi_memset.c
index b7775f919..b7775f919 100644
--- a/ports/sysdeps/arm/eabi/aeabi_memset.c
+++ b/ports/sysdeps/arm/aeabi_memset.c
diff --git a/ports/sysdeps/arm/eabi/aeabi_sighandlers.S b/ports/sysdeps/arm/aeabi_sighandlers.S
index 082039e9c..082039e9c 100644
--- a/ports/sysdeps/arm/eabi/aeabi_sighandlers.S
+++ b/ports/sysdeps/arm/aeabi_sighandlers.S
diff --git a/ports/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c b/ports/sysdeps/arm/aeabi_unwind_cpp_pr1.c
index 5dbbd9b0a..5dbbd9b0a 100644
--- a/ports/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
+++ b/ports/sysdeps/arm/aeabi_unwind_cpp_pr1.c
diff --git a/ports/sysdeps/arm/eabi/arm-mcount.S b/ports/sysdeps/arm/arm-mcount.S
index 5ee66bea0..5ee66bea0 100644
--- a/ports/sysdeps/arm/eabi/arm-mcount.S
+++ b/ports/sysdeps/arm/arm-mcount.S
diff --git a/ports/sysdeps/arm/eabi/armv6t2/memchr.S b/ports/sysdeps/arm/armv6t2/memchr.S
index 69ea320e8..69ea320e8 100644
--- a/ports/sysdeps/arm/eabi/armv6t2/memchr.S
+++ b/ports/sysdeps/arm/armv6t2/memchr.S
diff --git a/ports/sysdeps/arm/eabi/armv7/Implies b/ports/sysdeps/arm/armv7/Implies
index 8a784407f..c6cd0eb87 100644
--- a/ports/sysdeps/arm/eabi/armv7/Implies
+++ b/ports/sysdeps/arm/armv7/Implies
@@ -1,2 +1,2 @@
# We can do everything that 6T2 can
-arm/eabi/armv6t2
+arm/armv6t2
diff --git a/ports/sysdeps/arm/eabi/backtrace.c b/ports/sysdeps/arm/backtrace.c
index 3d839e628..3d839e628 100644
--- a/ports/sysdeps/arm/eabi/backtrace.c
+++ b/ports/sysdeps/arm/backtrace.c
diff --git a/ports/sysdeps/arm/eabi/bits/fenv.h b/ports/sysdeps/arm/bits/fenv.h
index 006ccf528..006ccf528 100644
--- a/ports/sysdeps/arm/eabi/bits/fenv.h
+++ b/ports/sysdeps/arm/bits/fenv.h
diff --git a/ports/sysdeps/arm/eabi/bits/huge_val.h b/ports/sysdeps/arm/bits/huge_val.h
index 6008b1008..6008b1008 100644
--- a/ports/sysdeps/arm/eabi/bits/huge_val.h
+++ b/ports/sysdeps/arm/bits/huge_val.h
diff --git a/ports/sysdeps/arm/eabi/bits/predefs.h b/ports/sysdeps/arm/bits/predefs.h
index aa33225f4..aa33225f4 100644
--- a/ports/sysdeps/arm/eabi/bits/predefs.h
+++ b/ports/sysdeps/arm/bits/predefs.h
diff --git a/ports/sysdeps/arm/eabi/bits/setjmp.h b/ports/sysdeps/arm/bits/setjmp.h
index bdc41ce86..bdc41ce86 100644
--- a/ports/sysdeps/arm/eabi/bits/setjmp.h
+++ b/ports/sysdeps/arm/bits/setjmp.h
diff --git a/ports/sysdeps/arm/eabi/Makefile b/ports/sysdeps/arm/eabi/Makefile
deleted file mode 100644
index 97bb49552..000000000
--- a/ports/sysdeps/arm/eabi/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-ifeq ($(subdir),csu)
-aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
-aeabi_routines = aeabi_assert aeabi_errno_addr \
- aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
- aeabi_memmove aeabi_memset
-ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
-aeabi_routines += aeabi_localeconv
-endif
-
-sysdep_routines += $(aeabi_constants) $(aeabi_routines)
-static-only-routines += $(aeabi_constants)
-
-# get offset to rtld_global._dl_hwcap
-gen-as-const-headers += rtld-global-offsets.sym
-endif
-
-ifeq ($(subdir),gmon)
-sysdep_routines += arm-mcount
-endif
-
-ifeq ($(subdir),debug)
-CFLAGS-backtrace.c += -funwind-tables
-CFLAGS-tst-backtrace2.c += -funwind-tables
-CFLAGS-tst-backtrace3.c += -funwind-tables
-CFLAGS-tst-backtrace4.c += -funwind-tables
-CFLAGS-tst-backtrace5.c += -funwind-tables
-CFLAGS-tst-backtrace6.c += -funwind-tables
-endif
-
-ifeq ($(subdir),elf)
-sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
-shared-only-routines += aeabi_unwind_cpp_pr1
-sysdep-rtld-routines += aeabi_unwind_cpp_pr1
-endif
-
-ifeq ($(subdir),math)
-$(objpfx)libm.so: $(elfobjdir)/ld.so
-endif
diff --git a/ports/sysdeps/arm/eabi/fclrexcpt.c b/ports/sysdeps/arm/fclrexcpt.c
index ddedc3573..ddedc3573 100644
--- a/ports/sysdeps/arm/eabi/fclrexcpt.c
+++ b/ports/sysdeps/arm/fclrexcpt.c
diff --git a/ports/sysdeps/arm/eabi/fedisblxcpt.c b/ports/sysdeps/arm/fedisblxcpt.c
index c9c62a48e..c9c62a48e 100644
--- a/ports/sysdeps/arm/eabi/fedisblxcpt.c
+++ b/ports/sysdeps/arm/fedisblxcpt.c
diff --git a/ports/sysdeps/arm/eabi/feenablxcpt.c b/ports/sysdeps/arm/feenablxcpt.c
index 3b2b934f5..3b2b934f5 100644
--- a/ports/sysdeps/arm/eabi/feenablxcpt.c
+++ b/ports/sysdeps/arm/feenablxcpt.c
diff --git a/ports/sysdeps/arm/eabi/fegetenv.c b/ports/sysdeps/arm/fegetenv.c
index c638635df..c638635df 100644
--- a/ports/sysdeps/arm/eabi/fegetenv.c
+++ b/ports/sysdeps/arm/fegetenv.c
diff --git a/ports/sysdeps/arm/eabi/fegetexcept.c b/ports/sysdeps/arm/fegetexcept.c
index 929d6c5cf..929d6c5cf 100644
--- a/ports/sysdeps/arm/eabi/fegetexcept.c
+++ b/ports/sysdeps/arm/fegetexcept.c
diff --git a/ports/sysdeps/arm/eabi/fegetround.c b/ports/sysdeps/arm/fegetround.c
index df1049706..df1049706 100644
--- a/ports/sysdeps/arm/eabi/fegetround.c
+++ b/ports/sysdeps/arm/fegetround.c
diff --git a/ports/sysdeps/arm/eabi/feholdexcpt.c b/ports/sysdeps/arm/feholdexcpt.c
index 4aed48bb3..4aed48bb3 100644
--- a/ports/sysdeps/arm/eabi/feholdexcpt.c
+++ b/ports/sysdeps/arm/feholdexcpt.c
diff --git a/ports/sysdeps/arm/eabi/fesetenv.c b/ports/sysdeps/arm/fesetenv.c
index 61370325e..61370325e 100644
--- a/ports/sysdeps/arm/eabi/fesetenv.c
+++ b/ports/sysdeps/arm/fesetenv.c
diff --git a/ports/sysdeps/arm/eabi/fesetround.c b/ports/sysdeps/arm/fesetround.c
index 997bd98f5..997bd98f5 100644
--- a/ports/sysdeps/arm/eabi/fesetround.c
+++ b/ports/sysdeps/arm/fesetround.c
diff --git a/ports/sysdeps/arm/eabi/feupdateenv.c b/ports/sysdeps/arm/feupdateenv.c
index 98f265432..98f265432 100644
--- a/ports/sysdeps/arm/eabi/feupdateenv.c
+++ b/ports/sysdeps/arm/feupdateenv.c
diff --git a/ports/sysdeps/arm/eabi/fgetexcptflg.c b/ports/sysdeps/arm/fgetexcptflg.c
index 41661a2e2..41661a2e2 100644
--- a/ports/sysdeps/arm/eabi/fgetexcptflg.c
+++ b/ports/sysdeps/arm/fgetexcptflg.c
diff --git a/ports/sysdeps/arm/eabi/find_exidx.c b/ports/sysdeps/arm/find_exidx.c
index 12ade46d8..12ade46d8 100644
--- a/ports/sysdeps/arm/eabi/find_exidx.c
+++ b/ports/sysdeps/arm/find_exidx.c
diff --git a/ports/sysdeps/arm/eabi/fpu_control.h b/ports/sysdeps/arm/fpu_control.h
index 635bc7d4e..635bc7d4e 100644
--- a/ports/sysdeps/arm/eabi/fpu_control.h
+++ b/ports/sysdeps/arm/fpu_control.h
diff --git a/ports/sysdeps/arm/eabi/fraiseexcpt.c b/ports/sysdeps/arm/fraiseexcpt.c
index 0a4368839..0a4368839 100644
--- a/ports/sysdeps/arm/eabi/fraiseexcpt.c
+++ b/ports/sysdeps/arm/fraiseexcpt.c
diff --git a/ports/sysdeps/arm/eabi/fsetexcptflg.c b/ports/sysdeps/arm/fsetexcptflg.c
index bee51a96a..bee51a96a 100644
--- a/ports/sysdeps/arm/eabi/fsetexcptflg.c
+++ b/ports/sysdeps/arm/fsetexcptflg.c
diff --git a/ports/sysdeps/arm/eabi/ftestexcept.c b/ports/sysdeps/arm/ftestexcept.c
index 06817d2fe..06817d2fe 100644
--- a/ports/sysdeps/arm/eabi/ftestexcept.c
+++ b/ports/sysdeps/arm/ftestexcept.c
diff --git a/ports/sysdeps/arm/eabi/jmpbuf-offsets.h b/ports/sysdeps/arm/jmpbuf-offsets.h
index 642a9657d..642a9657d 100644
--- a/ports/sysdeps/arm/eabi/jmpbuf-offsets.h
+++ b/ports/sysdeps/arm/jmpbuf-offsets.h
diff --git a/ports/sysdeps/arm/eabi/machine-gmon.h b/ports/sysdeps/arm/machine-gmon.h
index 671d6b176..671d6b176 100644
--- a/ports/sysdeps/arm/eabi/machine-gmon.h
+++ b/ports/sysdeps/arm/machine-gmon.h
diff --git a/ports/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure
index a4967004f..d98c167a9 100644
--- a/ports/sysdeps/arm/preconfigure
+++ b/ports/sysdeps/arm/preconfigure
@@ -7,7 +7,7 @@ arm*)
# Unfortunately it doesn't define any flags for implementations
# that you might pass to -mcpu or -mtune
# Note if you add patterns here you must ensure that
- # an appropriate directory exists in sysdeps/arm/eabi
+ # an appropriate directory exists in sysdeps/arm
archcppflag=`echo "" |
$CC $CFLAGS $CPPFLAGS -E -dM - |
grep __ARM_ARCH |
@@ -35,7 +35,7 @@ arm*)
;;
esac
- machine=arm/eabi/$machine
+ machine=arm/$machine
if [ "${CFLAGS+set}" != "set" ]; then
CFLAGS="-g -O2"
fi
diff --git a/ports/sysdeps/arm/eabi/rtld-global-offsets.sym b/ports/sysdeps/arm/rtld-global-offsets.sym
index ff4e97f2a..ff4e97f2a 100644
--- a/ports/sysdeps/arm/eabi/rtld-global-offsets.sym
+++ b/ports/sysdeps/arm/rtld-global-offsets.sym
diff --git a/ports/sysdeps/arm/eabi/setfpucw.c b/ports/sysdeps/arm/setfpucw.c
index d0cea32b9..d0cea32b9 100644
--- a/ports/sysdeps/arm/eabi/setfpucw.c
+++ b/ports/sysdeps/arm/setfpucw.c
diff --git a/ports/sysdeps/arm/eabi/setjmp.S b/ports/sysdeps/arm/setjmp.S
index 5e3f39cc7..5e3f39cc7 100644
--- a/ports/sysdeps/arm/eabi/setjmp.S
+++ b/ports/sysdeps/arm/setjmp.S
diff --git a/ports/sysdeps/arm/shlib-versions b/ports/sysdeps/arm/shlib-versions
index 491dd0adc..626d58bda 100644
--- a/ports/sysdeps/arm/shlib-versions
+++ b/ports/sysdeps/arm/shlib-versions
@@ -1,4 +1,3 @@
arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
-arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/ports/sysdeps/arm/start.S b/ports/sysdeps/arm/start.S
index a857d8b97..7f3de8c20 100644
--- a/ports/sysdeps/arm/start.S
+++ b/ports/sysdeps/arm/start.S
@@ -1,6 +1,5 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 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
@@ -58,14 +57,12 @@
NULL
*/
-#if defined(__ARM_EABI__)
/* Tag_ABI_align8_preserved: This code preserves 8-byte
alignment in any callee. */
.eabi_attribute 25, 1
/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
the caller. */
.eabi_attribute 24, 1
-#endif
#if defined(__thumb2__)
.thumb
diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h
index 6d15f798c..7800456f6 100644
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -77,8 +77,8 @@
/* If compiled for profiling, call `mcount' at the start of each function. */
#ifdef PROF
-/* Call __gnu_mcount_nc if GCC >= 4.4 and abi = EABI. */
-#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__)
+/* Call __gnu_mcount_nc if GCC >= 4.4. */
+#if __GNUC_PREREQ(4,4)
#define CALL_MCOUNT \
str lr,[sp, #-4]!; \
cfi_adjust_cfa_offset (4); \
@@ -104,19 +104,17 @@
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
#define syscall_error __syscall_error
-#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__)
+#if __GNUC_PREREQ(4,4)
#define mcount __gnu_mcount_nc
#else
#define mcount _mcount
#endif
-#if defined(__ARM_EABI__)
/* Tag_ABI_align8_preserved: This code preserves 8-byte
alignment in any callee. */
.eabi_attribute 25, 1
/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
the caller. */
.eabi_attribute 24, 1
-#endif
#endif /* __ASSEMBLER__ */
diff --git a/ports/sysdeps/hppa/configure b/ports/sysdeps/hppa/configure
index 7441a3279..c47fb6d0a 100644
--- a/ports/sysdeps/hppa/configure
+++ b/ports/sysdeps/hppa/configure
@@ -113,3 +113,59 @@ cat >>confdefs.h <<_ACEOF
#define ASM_LINE_SEP $libc_cv_asm_line_sep
_ACEOF
+
+# Check for support of thread-local storage handling in assembler and
+# linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5
+$as_echo_n "checking for hppa TLS support... " >&6; }
+if ${libc_cv_hppa_tls+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.s <<\EOF
+; Setup tls data
+.section ".tdata","awT",@progbits
+foo: .data 32
+ .text
+; Test general dyanmic relocations
+test0:
+ addil LT'foo-$tls_gdidx$, %r19
+ ldo RT'foo-$tls_gdidx$(%r1), %r26
+ b __tls_get_addr
+ nop
+; Test local dynamic relocations
+test1:
+ addil LT'foo-$tls_ldidx$, %r19
+ b __tls_get_addr
+ ldo RT'foo-$tls_ldidx$(%r1), %r26
+ ldo RR'foo-$tls_dtpoff$(%r1), %r25
+ ; More variables can be loaded...
+; Test initial exec reloctiosn
+test2:
+ mfctl %cr27, %r26
+ addil LT'foo-$tls_ieoff$, %r19
+ ldw RT'foo-$tls_ieoff$(%r1), %r25
+ add %r26, %r25, %r24
+; Test local exec relocations
+test3:
+ mfctl %cr27, %r26
+ addil LR'foo-$tls_leoff$, %r26
+ ldo RR'foo-$tls_leoff$(%r1), %r25
+; Done all the TLS tests.
+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_hppa_tls=yes
+else
+ libc_cv_hppa_tls=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5
+$as_echo "$libc_cv_hppa_tls" >&6; }
+if test $libc_cv_hppa_tls = no; then
+ as_fn_error $? "the assembler must support TLS" "$LINENO" 5
+fi
diff --git a/ports/sysdeps/hppa/configure.in b/ports/sysdeps/hppa/configure.in
index 1ec417b94..57cb941be 100644
--- a/ports/sysdeps/hppa/configure.in
+++ b/ports/sysdeps/hppa/configure.in
@@ -19,3 +19,48 @@ else
fi
rm -f conftest*])
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
+
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
+cat > conftest.s <<\EOF
+; Setup tls data
+.section ".tdata","awT",@progbits
+foo: .data 32
+ .text
+; Test general dyanmic relocations
+test0:
+ addil LT'foo-$tls_gdidx$, %r19
+ ldo RT'foo-$tls_gdidx$(%r1), %r26
+ b __tls_get_addr
+ nop
+; Test local dynamic relocations
+test1:
+ addil LT'foo-$tls_ldidx$, %r19
+ b __tls_get_addr
+ ldo RT'foo-$tls_ldidx$(%r1), %r26
+ ldo RR'foo-$tls_dtpoff$(%r1), %r25
+ ; More variables can be loaded...
+; Test initial exec reloctiosn
+test2:
+ mfctl %cr27, %r26
+ addil LT'foo-$tls_ieoff$, %r19
+ ldw RT'foo-$tls_ieoff$(%r1), %r25
+ add %r26, %r25, %r24
+; Test local exec relocations
+test3:
+ mfctl %cr27, %r26
+ addil LR'foo-$tls_leoff$, %r26
+ ldo RR'foo-$tls_leoff$(%r1), %r25
+; Done all the TLS tests.
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_hppa_tls=yes
+else
+ libc_cv_hppa_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_hppa_tls = no; then
+ AC_MSG_ERROR([the assembler must support TLS])
+fi
diff --git a/ports/sysdeps/hppa/crti.S b/ports/sysdeps/hppa/crti.S
new file mode 100644
index 000000000..4bb81bcac
--- /dev/null
+++ b/ports/sysdeps/hppa/crti.S
@@ -0,0 +1,80 @@
+/* Special .init and .fini section support for HPPA
+ 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
+ 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 GNU 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.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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/>. */
+
+/* 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. The symbols _init and _fini are
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
+
+#include <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+/* _init prologue. */
+ .section .init, "ax", %progbits
+ .align 4
+ .globl _init
+ .type _init,@function
+_init:
+ stw %rp,-20(%sp)
+ stwm %r4,64(%sp)
+ stw %r19,-32(%sp)
+#if PREINIT_FUNCTION_WEAK
+ bl PREINIT_FUNCTION,%rp
+ copy %r19,%r4 /* delay slot */
+#else
+ bl PREINIT_FUNCTION,%rp
+ copy %r19,%r4 /* delay slot */
+#endif
+ copy %r4,%r19
+
+/* _fini prologue. */
+ .section .fini,"ax",%progbits
+ .align 4
+ .globl _fini
+ .type _fini,@function
+_fini:
+ stw %rp,-20(%sp)
+ stwm %r4,64(%sp)
+ stw %r19,-32(%sp)
+ copy %r19,%r4
+
diff --git a/ports/sysdeps/hppa/crtn.S b/ports/sysdeps/hppa/crtn.S
new file mode 100644
index 000000000..679d739aa
--- /dev/null
+++ b/ports/sysdeps/hppa/crtn.S
@@ -0,0 +1,88 @@
+/* Special .init and .fini section support for HPPA
+ 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
+ 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 GNU 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.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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>
+
+/* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
+/* Note that we cannot have a weak undefined __gmon_start__, because
+ that would require this to be PIC, and the linker is currently not
+ able to generate a proper procedure descriptor for _init. Sad but
+ true. Anyway, HPPA is one of those horrible architectures where
+ making the comparison and indirect call is quite expensive (see the
+ comment in sysdeps/generic/initfini.c). */
+ .text
+ .align 4
+ .weak __gmon_start__
+ .type __gmon_start__,@function
+__gmon_start__:
+ .proc
+ .callinfo
+ .entry
+ bv,n %r0(%r2)
+ .exit
+ .procend
+
+/* Here is the tail end of _init. We put __gmon_start before this so
+ that the assembler creates the .PARISC.unwind section for us, ie.
+ with the right attributes. */
+ .section .init, "ax", @progbits
+ ldw -84(%sp),%rp
+ copy %r4,%r19
+ bv %r0(%rp)
+_end_init:
+ ldwm -64(%sp),%r4
+
+/* Our very own unwind info, because the assembler can't handle
+ functions split into two or more pieces. */
+ .section .PARISC.unwind
+ .extern _init
+ .word _init, _end_init
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
+
+/* Here is the tail end of _fini. */
+ .section .fini, "ax", @progbits
+ ldw -84(%sp),%rp
+ copy %r4,%r19
+ bv %r0(%rp)
+_end_fini:
+ ldwm -64(%sp),%r4
+
+ .section .PARISC.unwind
+ .extern _fini
+ .word _fini, _end_fini
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
+
diff --git a/ports/sysdeps/hppa/dl-fptr.c b/ports/sysdeps/hppa/dl-fptr.c
new file mode 100644
index 000000000..82b25b542
--- /dev/null
+++ b/ports/sysdeps/hppa/dl-fptr.c
@@ -0,0 +1,337 @@
+/* Manage function descriptors. Generic 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <libintl.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/mman.h>
+#include <link.h>
+#include <ldsodefs.h>
+#include <elf/dynamic-link.h>
+#include <dl-fptr.h>
+#include <atomic.h>
+
+#ifndef ELF_MACHINE_BOOT_FPTR_TABLE_LEN
+/* ELF_MACHINE_BOOT_FPTR_TABLE_LEN should be greater than the number of
+ dynamic symbols in ld.so. */
+# define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 256
+#endif
+
+#ifndef ELF_MACHINE_LOAD_ADDRESS
+# error "ELF_MACHINE_LOAD_ADDRESS is not defined."
+#endif
+
+#ifndef COMPARE_AND_SWAP
+# define COMPARE_AND_SWAP(ptr, old, new) \
+ (catomic_compare_and_exchange_bool_acq (ptr, new, old) == 0)
+#endif
+
+ElfW(Addr) _dl_boot_fptr_table [ELF_MACHINE_BOOT_FPTR_TABLE_LEN];
+
+static struct local
+ {
+ struct fdesc_table *root;
+ struct fdesc *free_list;
+ unsigned int npages; /* # of pages to allocate */
+ /* the next to members MUST be consecutive! */
+ struct fdesc_table boot_table;
+ struct fdesc boot_fdescs[1024];
+ }
+local =
+ {
+#ifdef SHARED
+ /* Address of .boot_table is not known until runtime. */
+ .root = 0,
+#else
+ .root = &local.boot_table,
+#endif
+ .npages = 2,
+ .boot_table =
+ {
+ .len = sizeof (local.boot_fdescs) / sizeof (local.boot_fdescs[0]),
+ .first_unused = 0
+ }
+ };
+
+/* Create a new fdesc table and return a pointer to the first fdesc
+ entry. The fdesc lock must have been acquired already. */
+
+static struct fdesc_table *
+new_fdesc_table (struct local *l, size_t *size)
+{
+ size_t old_npages = l->npages;
+ size_t new_npages = old_npages + old_npages;
+ struct fdesc_table *new_table;
+
+ /* If someone has just created a new table, we return NULL to tell
+ the caller to use the new table. */
+ if (! COMPARE_AND_SWAP (&l->npages, old_npages, new_npages))
+ return (struct fdesc_table *) NULL;
+
+ *size = old_npages * GLRO(dl_pagesize);
+ new_table = __mmap (NULL, *size,
+ PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
+ if (new_table == MAP_FAILED)
+ _dl_signal_error (errno, NULL, NULL,
+ N_("cannot map pages for fdesc table"));
+
+ new_table->len
+ = (*size - sizeof (*new_table)) / sizeof (struct fdesc);
+ new_table->first_unused = 1;
+ return new_table;
+}
+
+/* Must call _dl_fptr_init before using any other function. */
+void
+_dl_fptr_init (void)
+{
+ struct local *l;
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+ l->root = &l->boot_table;
+}
+
+static ElfW(Addr)
+make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
+{
+ struct fdesc *fdesc = NULL;
+ struct fdesc_table *root;
+ unsigned int old;
+ struct local *l;
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+
+ retry:
+ root = l->root;
+ while (1)
+ {
+ old = root->first_unused;
+ if (old >= root->len)
+ break;
+ else if (COMPARE_AND_SWAP (&root->first_unused, old, old + 1))
+ {
+ fdesc = &root->fdesc[old];
+ goto install;
+ }
+ }
+
+ if (l->free_list)
+ {
+ /* Get it from free-list. */
+ do
+ {
+ fdesc = l->free_list;
+ if (fdesc == NULL)
+ goto retry;
+ }
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list,
+ (ElfW(Addr)) fdesc, fdesc->ip));
+ }
+ else
+ {
+ /* Create a new fdesc table. */
+ size_t size;
+ struct fdesc_table *new_table = new_fdesc_table (l, &size);
+
+ if (new_table == NULL)
+ goto retry;
+
+ new_table->next = root;
+ if (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->root,
+ (ElfW(Addr)) root,
+ (ElfW(Addr)) new_table))
+ {
+ /* Someone has just installed a new table. Return NULL to
+ tell the caller to use the new table. */
+ __munmap (new_table, size);
+ goto retry;
+ }
+
+ /* Note that the first entry was reserved while allocating the
+ memory for the new page. */
+ fdesc = &new_table->fdesc[0];
+ }
+
+ install:
+ fdesc->ip = ip;
+ fdesc->gp = gp;
+
+ return (ElfW(Addr)) fdesc;
+}
+
+
+static inline ElfW(Addr) * __attribute__ ((always_inline))
+make_fptr_table (struct link_map *map)
+{
+ const ElfW(Sym) *symtab
+ = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+ const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ ElfW(Addr) *fptr_table;
+ size_t size;
+ size_t len;
+
+ /* XXX Apparently the only way to find out the size of the dynamic
+ symbol section is to assume that the string table follows right
+ afterwards... */
+ len = ((strtab - (char *) symtab)
+ / map->l_info[DT_SYMENT]->d_un.d_val);
+ size = ((len * sizeof (fptr_table[0]) + GLRO(dl_pagesize) - 1)
+ & -GLRO(dl_pagesize));
+ /* XXX We don't support here in the moment systems without MAP_ANON.
+ There probably are none for IA-64. In case this is proven wrong
+ we will have to open /dev/null here and use the file descriptor
+ instead of the hard-coded -1. */
+ fptr_table = __mmap (NULL, size,
+ PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE,
+ -1, 0);
+ if (fptr_table == MAP_FAILED)
+ _dl_signal_error (errno, NULL, NULL,
+ N_("cannot map pages for fptr table"));
+
+ if (COMPARE_AND_SWAP ((ElfW(Addr) *) &map->l_mach.fptr_table,
+ (ElfW(Addr)) NULL, (ElfW(Addr)) fptr_table))
+ map->l_mach.fptr_table_len = len;
+ else
+ __munmap (fptr_table, len * sizeof (fptr_table[0]));
+
+ return map->l_mach.fptr_table;
+}
+
+
+ElfW(Addr)
+_dl_make_fptr (struct link_map *map, const ElfW(Sym) *sym,
+ ElfW(Addr) ip)
+{
+ ElfW(Addr) *ftab = map->l_mach.fptr_table;
+ const ElfW(Sym) *symtab;
+ Elf_Symndx symidx;
+ struct local *l;
+
+ if (__builtin_expect (ftab == NULL, 0))
+ ftab = make_fptr_table (map);
+
+ symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+ symidx = sym - symtab;
+
+ if (symidx >= map->l_mach.fptr_table_len)
+ _dl_signal_error (0, NULL, NULL,
+ N_("internal error: symidx out of range of fptr table"));
+
+ while (ftab[symidx] == 0)
+ {
+ /* GOT has already been relocated in elf_get_dynamic_info -
+ don't try to relocate it again. */
+ ElfW(Addr) fdesc
+ = make_fdesc (ip, map->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ if (__builtin_expect (COMPARE_AND_SWAP (&ftab[symidx], (ElfW(Addr)) NULL,
+ fdesc), 1))
+ {
+ /* Noone has updated the entry and the new function
+ descriptor has been installed. */
+#if 0
+ const char *strtab
+ = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+ if (l->root != &l->boot_table
+ || l->boot_table.first_unused > 20)
+ _dl_debug_printf ("created fdesc symbol `%s' at %lx\n",
+ strtab + sym->st_name, ftab[symidx]);
+#endif
+ break;
+ }
+ else
+ {
+ /* We created a duplicated function descriptor. We put it on
+ free-list. */
+ struct fdesc *f = (struct fdesc *) fdesc;
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+
+ do
+ f->ip = (ElfW(Addr)) l->free_list;
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list,
+ f->ip, fdesc));
+ }
+ }
+
+ return ftab[symidx];
+}
+
+
+void
+_dl_unmap (struct link_map *map)
+{
+ ElfW(Addr) *ftab = map->l_mach.fptr_table;
+ struct fdesc *head = NULL, *tail = NULL;
+ size_t i;
+
+ __munmap ((void *) map->l_map_start,
+ map->l_map_end - map->l_map_start);
+
+ if (ftab == NULL)
+ return;
+
+ /* String together the fdesc structures that are being freed. */
+ for (i = 0; i < map->l_mach.fptr_table_len; ++i)
+ {
+ if (ftab[i])
+ {
+ *(struct fdesc **) ftab[i] = head;
+ head = (struct fdesc *) ftab[i];
+ if (tail == NULL)
+ tail = head;
+ }
+ }
+
+ /* Prepend the new list to the free_list: */
+ if (tail)
+ do
+ tail->ip = (ElfW(Addr)) local.free_list;
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &local.free_list,
+ tail->ip, (ElfW(Addr)) head));
+
+ __munmap (ftab, (map->l_mach.fptr_table_len
+ * sizeof (map->l_mach.fptr_table[0])));
+
+ map->l_mach.fptr_table = NULL;
+}
+
+
+ElfW(Addr)
+_dl_lookup_address (const void *address)
+{
+ ElfW(Addr) addr = (ElfW(Addr)) address;
+ struct fdesc_table *t;
+ unsigned long int i;
+
+ for (t = local.root; t != NULL; t = t->next)
+ {
+ i = (struct fdesc *) addr - &t->fdesc[0];
+ if (i < t->first_unused && addr == (ElfW(Addr)) &t->fdesc[i])
+ {
+ addr = t->fdesc[i].ip;
+ break;
+ }
+ }
+
+ return addr;
+}
diff --git a/ports/sysdeps/hppa/dl-fptr.h b/ports/sysdeps/hppa/dl-fptr.h
index 9f998651a..ae504de08 100644
--- a/ports/sysdeps/hppa/dl-fptr.h
+++ b/ports/sysdeps/hppa/dl-fptr.h
@@ -1,5 +1,5 @@
/* Function descriptors. HPPA version.
- Copyright (C) 2003, 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
@@ -21,6 +21,9 @@
#include <sysdeps/generic/dl-fptr.h>
+/* Initialize function pointer code. Call before relocation processing. */
+extern void _dl_fptr_init (void);
+
/* There are currently 33 dynamic symbols in ld.so.
ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64
diff --git a/ports/sysdeps/hppa/dl-irel.h b/ports/sysdeps/hppa/dl-irel.h
new file mode 100644
index 000000000..90928470b
--- /dev/null
+++ b/ports/sysdeps/hppa/dl-irel.h
@@ -0,0 +1,47 @@
+/* Machine-dependent ELF indirect relocation inline functions.
+ HP-PARISC 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _DL_IREL_H
+#define _DL_IREL_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <dl-fptr.h>
+
+#define ELF_MACHINE_IREL 1
+
+/* Implement enough to get the build going again. */
+#warning "NEED STT_GNU_IFUNC IMPLEMENTATION"
+
+static inline struct fdesc
+__attribute ((always_inline))
+elf_ifunc_invoke (uintptr_t addr)
+{
+ return ((struct fdesc) {0, 0});
+}
+
+static inline void
+__attribute ((always_inline))
+elf_irel (const Elf32_Rel *reloc)
+{
+ return;
+}
+
+#endif /* dl-irel.h */
diff --git a/ports/sysdeps/hppa/dl-machine.h b/ports/sysdeps/hppa/dl-machine.h
index b63e36ee6..1bee330f8 100644
--- a/ports/sysdeps/hppa/dl-machine.h
+++ b/ports/sysdeps/hppa/dl-machine.h
@@ -1,6 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995-1997,1999-2003,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
@@ -63,7 +62,8 @@ __hppa_init_bootstrap_fdesc_table (struct link_map *map)
}
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
- __hppa_init_bootstrap_fdesc_table (&bootstrap_map);
+ __hppa_init_bootstrap_fdesc_table (&bootstrap_map); \
+ _dl_fptr_init();
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
diff --git a/ports/sysdeps/hppa/elf/configure b/ports/sysdeps/hppa/elf/configure
deleted file mode 100644
index d61f35366..000000000
--- a/ports/sysdeps/hppa/elf/configure
+++ /dev/null
@@ -1,140 +0,0 @@
-
-# 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/hppa/elf.
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5
-$as_echo_n "checking for hppa TLS support... " >&6; }
-if ${libc_cv_hppa_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
-; Setup tls data
-.section ".tdata","awT",@progbits
-foo: .data 32
- .text
-; Test general dyanmic relocations
-test0:
- addil LT'foo-$tls_gdidx$, %r19
- ldo RT'foo-$tls_gdidx$(%r1), %r26
- b __tls_get_addr
- nop
-; Test local dynamic relocations
-test1:
- addil LT'foo-$tls_ldidx$, %r19
- b __tls_get_addr
- ldo RT'foo-$tls_ldidx$(%r1), %r26
- ldo RR'foo-$tls_dtpoff$(%r1), %r25
- ; More variables can be loaded...
-; Test initial exec reloctiosn
-test2:
- mfctl %cr27, %r26
- addil LT'foo-$tls_ieoff$, %r19
- ldw RT'foo-$tls_ieoff$(%r1), %r25
- add %r26, %r25, %r24
-; Test local exec relocations
-test3:
- mfctl %cr27, %r26
- addil LR'foo-$tls_leoff$, %r26
- ldo RR'foo-$tls_leoff$(%r1), %r25
-; Done all the TLS tests.
-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_hppa_tls=yes
-else
- libc_cv_hppa_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5
-$as_echo "$libc_cv_hppa_tls" >&6; }
-if test $libc_cv_hppa_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
diff --git a/ports/sysdeps/hppa/elf/configure.in b/ports/sysdeps/hppa/elf/configure.in
deleted file mode 100644
index e31c880c1..000000000
--- a/ports/sysdeps/hppa/elf/configure.in
+++ /dev/null
@@ -1,47 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/hppa/elf.
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
-cat > conftest.s <<\EOF
-; Setup tls data
-.section ".tdata","awT",@progbits
-foo: .data 32
- .text
-; Test general dyanmic relocations
-test0:
- addil LT'foo-$tls_gdidx$, %r19
- ldo RT'foo-$tls_gdidx$(%r1), %r26
- b __tls_get_addr
- nop
-; Test local dynamic relocations
-test1:
- addil LT'foo-$tls_ldidx$, %r19
- b __tls_get_addr
- ldo RT'foo-$tls_ldidx$(%r1), %r26
- ldo RR'foo-$tls_dtpoff$(%r1), %r25
- ; More variables can be loaded...
-; Test initial exec reloctiosn
-test2:
- mfctl %cr27, %r26
- addil LT'foo-$tls_ieoff$, %r19
- ldw RT'foo-$tls_ieoff$(%r1), %r25
- add %r26, %r25, %r24
-; Test local exec relocations
-test3:
- mfctl %cr27, %r26
- addil LR'foo-$tls_leoff$, %r26
- ldo RR'foo-$tls_leoff$(%r1), %r25
-; Done all the TLS tests.
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_hppa_tls=yes
-else
- libc_cv_hppa_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_hppa_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
diff --git a/ports/sysdeps/hppa/elf/initfini.c b/ports/sysdeps/hppa/elf/initfini.c
deleted file mode 100644
index 90964f504..000000000
--- a/ports/sysdeps/hppa/elf/initfini.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Special .init and .fini section support for HPPA
- Copyright (C) 2000, 2002 Free Software 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 GNU 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.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
- 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.
-
- Note that we cannot have a weak undefined __gmon_start__, because
- that would require this to be PIC, and the linker is currently not
- able to generate a proper procedure descriptor for _init. Sad but
- true. Anyway, HPPA is one of those horrible architectures where
- making the comparison and indirect call is quite expensive (see the
- comment in sysdeps/generic/initfini.c). */
-
-__asm__ ("\
-\n\
-#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 __gmon_start__,%rp\n\
- copy %r19,%r4 /* delay slot */\n\
- copy %r4,%r19\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .text\n\
- .align 4\n\
- .weak __gmon_start__\n\
- .type __gmon_start__,@function\n\
-__gmon_start__:\n\
- .proc\n\
- .callinfo\n\
- .entry\n\
- bv,n %r0(%r2)\n\
- .exit\n\
- .procend\n\
-\n\
-/* Here is the tail end of _init. We put __gmon_start before this so\n\
- that the assembler creates the .PARISC.unwind section for us, ie.\n\
- with the right attributes. */\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\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\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*/\
-");
diff --git a/ports/sysdeps/hppa/elf/entry.h b/ports/sysdeps/hppa/entry.h
index b024db2be..b024db2be 100644
--- a/ports/sysdeps/hppa/elf/entry.h
+++ b/ports/sysdeps/hppa/entry.h
diff --git a/ports/sysdeps/hppa/elf/start.S b/ports/sysdeps/hppa/start.S
index 97196bd52..97196bd52 100644
--- a/ports/sysdeps/hppa/elf/start.S
+++ b/ports/sysdeps/hppa/start.S
diff --git a/ports/sysdeps/m68k/m680x0/fpu/s_ilogb.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogb.c
index ab4438aea..41c597a01 100644
--- a/ports/sysdeps/m68k/m680x0/fpu/s_ilogb.c
+++ b/ports/sysdeps/m68k/m680x0/fpu/e_ilogb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 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,7 +30,7 @@
#define m81(func) __m81_u(s(func))
int
-s(__ilogb) (float_type x)
+s(__ieee754_ilogb) (float_type x)
{
float_type result;
unsigned long x_cond;
@@ -45,6 +45,3 @@ s(__ilogb) (float_type x)
__asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x));
return (int) result;
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__ilogb), s(ilogb))
diff --git a/ports/sysdeps/m68k/m680x0/fpu/s_ilogbf.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbf.c
index 4031c42ff..34a8cd28e 100644
--- a/ports/sysdeps/m68k/m680x0/fpu/s_ilogbf.c
+++ b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbf.c
@@ -1,3 +1,3 @@
#define SUFF f
#define float_type float
-#include <s_ilogb.c>
+#include <e_ilogb.c>
diff --git a/ports/sysdeps/m68k/m680x0/fpu/s_ilogbl.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbl.c
index 9c55a115e..b0e13af6b 100644
--- a/ports/sysdeps/m68k/m680x0/fpu/s_ilogbl.c
+++ b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbl.c
@@ -1,3 +1,3 @@
#define SUFF l
#define float_type long double
-#include <s_ilogb.c>
+#include <e_ilogb.c>
diff --git a/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
index b153ba9be..9344b512b 100644
--- a/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
+++ b/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
@@ -876,12 +876,39 @@ idouble: 1
ildouble: 2
ldouble: 2
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real 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":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
ildouble: 2
ldouble: 2
@@ -890,11 +917,21 @@ Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
float: 1
@@ -902,6 +939,26 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
+ildouble: 2
+ldouble: 2
# erfc
Test "erfc (0.75) == 0.288844366346484868401062165408589223":
@@ -2099,15 +2156,21 @@ ldouble: 1
Function: Real part of "ctan":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 2
ldouble: 2
Function: Imaginary part of "ctan":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Function: Real part of "ctanh":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -2116,8 +2179,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "erfc":
float: 1
diff --git a/ports/sysdeps/unix/sysv/linux/arm/Makefile b/ports/sysdeps/unix/sysv/linux/arm/Makefile
index a9817368a..fb1e3a5b9 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/ports/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,4 +1,9 @@
ifeq ($(subdir),csu)
+# In order for unwinding to fail when it falls out of main, we need a
+# cantunwind marker. There's one in start.S. To make sure we reach it, add
+# unwind tables for __libc_start_main.
+CFLAGS-libc-start.c += -fexceptions
+
sysdep_routines += aeabi_read_tp libc-aeabi_read_tp
static-only-routines += aeabi_read_tp
shared-only-routines += libc-aeabi_read_tp
@@ -24,3 +29,39 @@ endif
ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
endif
+
+# Add a syscall function to each library that needs one.
+
+ifeq ($(subdir),rt)
+librt-sysdep_routines += libc-do-syscall
+librt-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += libc-do-syscall
+libpthread-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),resolv)
+libanl-sysdep_routines += libc-do-syscall
+libanl-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),csu)
+sysdep_routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nscd)
+nscd-modules += libc-do-syscall
+endif
+
+ifeq ($(subdir),nss)
+libnss_db-sysdep_routines += libc-do-syscall
+libnss_db-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),posix)
+LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
+endif
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
index 8ec41521c..8ec41521c 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S
index 8da41171f..ec042fff9 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,5 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 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 Pat Beirne <patb@corelcomputer.com>
@@ -49,33 +48,19 @@ ENTRY(__clone)
mov ip, r2
#endif
@ new sp is already in r1
-#ifdef __ARM_EABI__
stmfd sp!, {r4, r7}
cfi_adjust_cfa_offset (8)
cfi_rel_offset (r4, 0)
cfi_rel_offset (r7, 4)
-#else
- str r4, [sp, #-8]!
- cfi_adjust_cfa_offset (8)
- cfi_rel_offset (r4, 0)
-#endif
ldr r2, [sp, #8]
ldr r3, [sp, #12]
ldr r4, [sp, #16]
-#ifdef __ARM_EABI__
ldr r7, =SYS_ify(clone)
swi 0x0
-#else
- swi SYS_ify(clone)
-#endif
cfi_endproc
cmp r0, #0
beq 1f
-#ifdef __ARM_EABI__
ldmfd sp!, {r4, r7}
-#else
- ldr r4, [sp], #8
-#endif
blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
RETINSTR(, lr)
@@ -94,12 +79,8 @@ PSEUDO_END (__clone)
mov r1, r0
tst ip, #CLONE_VM
movne r0, #-1
-#ifdef __ARM_EABI__
ldr r7, =SYS_ify(getpid)
swieq 0x0
-#else
- swieq SYS_ify(getpid)
-#endif
str r0, [r1, #PID_OFFSET]
str r0, [r1, #TID_OFFSET]
3:
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/configure b/ports/sysdeps/unix/sysv/linux/arm/configure
index c7e20cfdc..5b5f4c993 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/configure
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure
@@ -1,5 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
+ # Local configure fragment for sysdeps/unix/sysv/linux/arm.
arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/ports/sysdeps/unix/sysv/linux/arm/configure.in
index cc0e9b5bd..b57c4e37b 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure.in
@@ -1,5 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
+# Local configure fragment for sysdeps/unix/sysv/linux/arm.
arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile
deleted file mode 100644
index b7baae9e9..000000000
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-ifeq ($(subdir),csu)
-# In order for unwinding to fail when it falls out of main, we need a
-# cantunwind marker. There's one in start.S. To make sure we reach it, add
-# unwind tables for __libc_start_main.
-CFLAGS-libc-start.c += -fexceptions
-endif
-
-# Add a syscall function to each library that needs one.
-
-ifeq ($(subdir),rt)
-librt-sysdep_routines += libc-do-syscall
-librt-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += libc-do-syscall
-libpthread-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),resolv)
-libanl-sysdep_routines += libc-do-syscall
-libanl-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),csu)
-sysdep_routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),nscd)
-nscd-modules += libc-do-syscall
-endif
-
-ifeq ($(subdir),nss)
-libnss_db-sysdep_routines += libc-do-syscall
-libnss_db-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),posix)
-LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
-LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
-LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
-endif
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
deleted file mode 100644
index e89690247..000000000
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+++ /dev/null
@@ -1,32 +0,0 @@
-# File name Caller Syscall name # args Strong name Weak names
-
-# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
-# wrappers (to set __IPC_64).
-msgget - msgget i:ii __msgget msgget
-msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
-msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
-shmat - shmat i:ipi __shmat shmat
-shmdt - shmdt i:s __shmdt shmdt
-shmget - shmget i:iii __shmget shmget
-semop - semop i:ipi __semop semop
-semtimedop - semtimedop i:ipip semtimedop
-semget - semget i:iii __semget semget
-
-# proper socket implementations:
-accept - accept Ci:iBN __libc_accept __accept accept
-bind - bind i:ipi __bind bind
-connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
-getpeername - getpeername i:ipp __getpeername getpeername
-getsockname - getsockname i:ipp __getsockname getsockname
-getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
-listen - listen i:ii __listen listen
-recv - recv Ci:ibni __libc_recv __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
-setsockopt - setsockopt i:iiibn __setsockopt setsockopt
-shutdown - shutdown i:ii __shutdown shutdown
-socket - socket i:iii __socket socket
-socketpair - socketpair i:iiif __socketpair socketpair
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
deleted file mode 100644
index 408142c1a..000000000
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Copyright (C) 2005, 2006, 2007, 2009
- Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- Contributed by Daniel Jacobowitz <dan@codesourcery.com>, Oct 2005.
-
- 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 _LINUX_ARM_EABI_SYSDEP_H
-#define _LINUX_ARM_EABI_SYSDEP_H 1
-
-#include <arm/sysdep.h>
-
-#include <tls.h>
-
-#if __NR_SYSCALL_BASE != 0
-# error Kernel headers are too old
-#endif
-
-/* Don't use stime, even if the kernel headers define it. We have
- settimeofday, and some EABI kernels have removed stime. Similarly
- use setitimer to implement alarm. */
-#undef __NR_stime
-#undef __NR_alarm
-
-/* The ARM EABI user interface passes the syscall number in r7, instead
- of in the swi. This is more efficient, because the kernel does not need
- to fetch the swi from memory to find out the number; which can be painful
- with separate I-cache and D-cache. Make sure to use 0 for the SWI
- argument; otherwise the (optional) compatibility code for APCS binaries
- may be invoked. */
-
-#if defined(__thumb__)
-/* We can not expose the use of r7 to the compiler. GCC (as
- of 4.5) uses r7 as the hard frame pointer for Thumb - although
- for Thumb-2 it isn't obviously a better choice than r11.
- And GCC does not support asms that conflict with the frame
- pointer.
-
- This would be easier if syscall numbers never exceeded 255,
- but they do. For the moment the LOAD_ARGS_7 is sacrificed.
- We can't use push/pop inside the asm because that breaks
- unwinding (i.e. thread cancellation) for this frame. We can't
- locally save and restore r7, because we do not know if this
- function uses r7 or if it is our caller's r7; if it is our caller's,
- then unwinding will fail higher up the stack. So we move the
- syscall out of line and provide its own unwind information. */
-#undef LOAD_ARGS_7
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
- ({ \
- register int _a1 asm ("a1"); \
- int _nametmp = name; \
- LOAD_ARGS_##nr (args) \
- register int _name asm ("ip") = _nametmp; \
- asm volatile ("bl __libc_do_syscall" \
- : "=r" (_a1) \
- : "r" (_name) ASM_ARGS_##nr \
- : "memory", "lr"); \
- _a1; })
-#else /* ARM */
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
- ({ \
- register int _a1 asm ("r0"), _nr asm ("r7"); \
- LOAD_ARGS_##nr (args) \
- _nr = name; \
- asm volatile ("swi 0x0 @ syscall " #name \
- : "=r" (_a1) \
- : "r" (_nr) ASM_ARGS_##nr \
- : "memory"); \
- _a1; })
-#endif
-
-/* For EABI, non-constant syscalls are actually pretty easy... */
-#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_RAW (number, err, nr, args)
-
-/* We must save and restore r7 (call-saved) for the syscall number.
- We never make function calls from inside here (only potentially
- signal handlers), so we do not bother with doubleword alignment.
-
- Just like the APCS syscall convention, the EABI syscall convention uses
- r0 through r6 for up to seven syscall arguments. None are ever passed to
- the kernel on the stack, although incoming arguments are on the stack for
- syscalls with five or more arguments.
-
- The assembler will convert the literal pool load to a move for most
- syscalls. */
-
-#undef DO_CALL
-#define DO_CALL(syscall_name, args) \
- DOARGS_##args; \
- ldr r7, =SYS_ify (syscall_name); \
- swi 0x0; \
- UNDOARGS_##args
-
-#undef DOARGS_0
-#define DOARGS_0 \
- .fnstart; \
- str r7, [sp, #-4]!; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (r7, 0); \
- .save { r7 }
-#undef DOARGS_1
-#define DOARGS_1 DOARGS_0
-#undef DOARGS_2
-#define DOARGS_2 DOARGS_0
-#undef DOARGS_3
-#define DOARGS_3 DOARGS_0
-#undef DOARGS_4
-#define DOARGS_4 DOARGS_0
-#undef DOARGS_5
-#define DOARGS_5 \
- .fnstart; \
- stmfd sp!, {r4, r7}; \
- cfi_adjust_cfa_offset (8); \
- cfi_rel_offset (r4, 0); \
- cfi_rel_offset (r7, 4); \
- .save { r4, r7 }; \
- ldr r4, [sp, #8]
-#undef DOARGS_6
-#define DOARGS_6 \
- .fnstart; \
- mov ip, sp; \
- stmfd sp!, {r4, r5, r7}; \
- cfi_adjust_cfa_offset (12); \
- cfi_rel_offset (r4, 0); \
- cfi_rel_offset (r5, 4); \
- cfi_rel_offset (r7, 8); \
- .save { r4, r5, r7 }; \
- ldmia ip, {r4, r5}
-#undef DOARGS_7
-#define DOARGS_7 \
- .fnstart; \
- mov ip, sp; \
- stmfd sp!, {r4, r5, r6, r7}; \
- cfi_adjust_cfa_offset (16); \
- cfi_rel_offset (r4, 0); \
- cfi_rel_offset (r5, 4); \
- cfi_rel_offset (r6, 8); \
- cfi_rel_offset (r7, 12); \
- .save { r4, r5, r6, r7 }; \
- ldmia ip, {r4, r5, r6}
-
-#undef UNDOARGS_0
-#define UNDOARGS_0 \
- ldr r7, [sp], #4; \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (r7); \
- .fnend
-#undef UNDOARGS_1
-#define UNDOARGS_1 UNDOARGS_0
-#undef UNDOARGS_2
-#define UNDOARGS_2 UNDOARGS_0
-#undef UNDOARGS_3
-#define UNDOARGS_3 UNDOARGS_0
-#undef UNDOARGS_4
-#define UNDOARGS_4 UNDOARGS_0
-#undef UNDOARGS_5
-#define UNDOARGS_5 \
- ldmfd sp!, {r4, r7}; \
- cfi_adjust_cfa_offset (-8); \
- cfi_restore (r4); \
- cfi_restore (r7); \
- .fnend
-#undef UNDOARGS_6
-#define UNDOARGS_6 \
- ldmfd sp!, {r4, r5, r7}; \
- cfi_adjust_cfa_offset (-12); \
- cfi_restore (r4); \
- cfi_restore (r5); \
- cfi_restore (r7); \
- .fnend
-#undef UNDOARGS_7
-#define UNDOARGS_7 \
- ldmfd sp!, {r4, r5, r6, r7}; \
- cfi_adjust_cfa_offset (-16); \
- cfi_restore (r4); \
- cfi_restore (r5); \
- cfi_restore (r6); \
- cfi_restore (r7); \
- .fnend
-
-#endif /* _LINUX_ARM_EABI_SYSDEP_H */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/ports/sysdeps/unix/sysv/linux/arm/ftruncate64.c
index ad5eb186c..ad5eb186c 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/ftruncate64.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
index 435eb12c8..116d6e8f3 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
@@ -48,7 +48,7 @@ ENTRY(__getcontext)
add r2, r4, #UCONTEXT_SIGMASK
bl PLTJMP(__sigprocmask)
- /* Store FP regs. Much of the FP code is copied from arm/eabi/setjmp.S. */
+ /* Store FP regs. Much of the FP code is copied from arm/setjmp.S. */
#ifdef PIC
ldr r2, 1f
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S b/ports/sysdeps/unix/sysv/linux/arm/internal_accept4.S
index eeb5f50a2..eeb5f50a2 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/internal_accept4.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S b/ports/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S
index eeb5f50a2..eeb5f50a2 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S b/ports/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S
index eeb5f50a2..eeb5f50a2 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
index 839dc1892..8980bb199 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ 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
@@ -23,12 +23,9 @@
#undef VALID_ELF_HEADER
#undef VALID_ELF_OSABI
+#undef MORE_ELF_HEADER_DATA
-#ifdef __ARM_EABI__
#define EXTRA_OSABI ELFOSABI_ARM_AEABI
-#else
-#define EXTRA_OSABI ELFOSABI_ARM
-#endif
#define VALID_ELF_HEADER(hdr,exp,size) \
(memcmp (hdr, exp, size) == 0 \
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
index 0ec81734f..0ec81734f 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c b/ports/sysdeps/unix/sysv/linux/arm/makecontext.c
index d6ae6f0d7..d6ae6f0d7 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/makecontext.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S
index be4dd52de..be4dd52de 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c b/ports/sysdeps/unix/sysv/linux/arm/msgctl.c
index 38aedadf4..38aedadf4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/msgctl.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile b/ports/sysdeps/unix/sysv/linux/arm/nptl/Makefile
index ef8076cf3..ef8076cf3 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/Makefile
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure
index 518269913..518269913 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in
index 22f6f4b8f..22f6f4b8f 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c
index 7b8352243..7b8352243 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c
index 7b8352243..7b8352243 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
index c26bec3dc..c26bec3dc 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
index 29e2c2b00..29e2c2b00 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
index 285b99b5e..285b99b5e 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
index 9b6bed8e3..9b6bed8e3 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c
index 6e25b021a..6e25b021a 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c
index 6e25b021a..6e25b021a 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/ports/sysdeps/unix/sysv/linux/arm/pread.c
index 4efe349e9..4efe349e9 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/pread.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/pread.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/ports/sysdeps/unix/sysv/linux/arm/pread64.c
index 59bd9cfe0..59bd9cfe0 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/pread64.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/pread64.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c
index 43788e542..43788e542 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c
index c7bfdaf9f..c7bfdaf9f 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/readahead.c b/ports/sysdeps/unix/sysv/linux/arm/readahead.c
index 2d15b09c4..2d15b09c4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/readahead.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/readahead.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c b/ports/sysdeps/unix/sysv/linux/arm/semctl.c
index 145162909..145162909 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/semctl.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
index 78003f52d..b47294773 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -29,7 +29,7 @@ ENTRY(__setcontext)
mov r4, r0
add r0, r0, #UCONTEXT_REGSPACE
- /* Restore the VFP registers. Copied from arm/eabi/__longjmp.S. */
+ /* Restore the VFP registers. Copied from arm/__longjmp.S. */
#ifdef PIC
ldr r2, 1f
ldr r1, Lrtld_global_ro
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c b/ports/sysdeps/unix/sysv/linux/arm/shmctl.c
index c121e9991..c121e9991 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/shmctl.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/sigaction.c b/ports/sysdeps/unix/sysv/linux/arm/sigaction.c
index 4f6e8bff9..e7b51c627 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2006
- 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
@@ -35,26 +34,21 @@ int __libc_missing_rt_sigs;
#define SA_RESTORER 0x04000000
-#ifdef __ARM_EABI__
extern void __default_sa_restorer_v1(void);
extern void __default_sa_restorer_v2(void);
extern void __default_rt_sa_restorer_v1(void);
extern void __default_rt_sa_restorer_v2(void);
-# ifdef __ASSUME_SIGFRAME_V2
-# define __default_sa_restorer __default_sa_restorer_v2
-# define __default_rt_sa_restorer __default_rt_sa_restorer_v2
-# else
-# include <ldsodefs.h>
-# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+#ifdef __ASSUME_SIGFRAME_V2
+# define __default_sa_restorer __default_sa_restorer_v2
+# define __default_rt_sa_restorer __default_rt_sa_restorer_v2
+#else
+# include <ldsodefs.h>
+# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
? __default_sa_restorer_v2 \
: __default_sa_restorer_v1)
-# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
? __default_rt_sa_restorer_v2 \
: __default_rt_sa_restorer_v1)
-# endif
-#else
-extern void __default_sa_restorer(void);
-extern void __default_rt_sa_restorer(void);
#endif
/* When RT signals are in use we need to use a different return stub. */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S
index b8ae839f5..b8ae839f5 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/socket.S b/ports/sysdeps/unix/sysv/linux/arm/socket.S
deleted file mode 100644
index 5d238d3ed..000000000
--- a/ports/sysdeps/unix/sysv/linux/arm/socket.S
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 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/>. */
-
-#include <sysdep-cancel.h>
-#include <socketcall.h>
-
-#define P(a, b) P2(a, b)
-#define P2(a, b) a##b
-
- .text
-/* The socket-oriented system calls are handled unusally in Linux.
- They are all gated through the single `socketcall' system call number.
- `socketcall' takes two arguments: the first is the subcode, specifying
- which socket function is being called; and the second is a pointer to
- the arguments to the specific function.
-
- The .S files for the other calls just #define socket and #include this. */
-
-#ifndef __socket
-# ifndef NO_WEAK_ALIAS
-# define __socket P(__,socket)
-# else
-# define __socket socket
-# endif
-#endif
-
-#define PUSHARGS_1 str a1, [sp, $-4]!
-#define PUSHARGS_2 stmfd sp!, {a1, a2}
-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3}
-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}
-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}
-
-#define POPARGS_1 add sp, sp, #4
-#define POPARGS_2 add sp, sp, #8
-#define POPARGS_3 add sp, sp, #12
-#define POPARGS_4 add sp, sp, #16
-#define POPARGS_5 add sp, sp, #16
-#define POPARGS_6 add sp, sp, #16
-
-#ifndef NARGS
-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
-#endif
-
-#if defined NEED_CANCELLATION && defined CENABLE
- PSEUDO_PROLOGUE
-#endif
-
-.globl __socket
-ENTRY (__socket)
- /* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
- instruction and meant no stack cleanup work was required.
-
- This will not work in the case of a socket call being interrupted
- by a signal. If the signal handler uses any stack the arguments
- to socket will be trashed. The results of a restart of any
- socket call are then unpredictable. */
-
- /* Push args onto the stack. */
- P(PUSHARGS_,NARGS)
-
-#if defined NEED_CANCELLATION && defined CENABLE
- SINGLE_THREAD_P
- bne 1f
-#endif
-
- /* Do the system call trap. */
- mov a1, $P(SOCKOP_,socket)
- mov a2, sp
- swi SYS_ify(socketcall)
-
- /* Pop args off the stack */
- P(POPARGS_,NARGS)
-
- /* r0 is < 0 if there was an error. */
- cmn r0, $124
- RETINSTR(cc, r14)
- b PLTJMP(SYSCALL_ERROR)
-
-#if defined NEED_CANCELLATION && defined CENABLE
-1:
- str lr, [sp, #-4]!
- CENABLE
- mov ip, r0
-
- mov r0, #P(SOCKOP_,socket)
- add r1, sp, #4
- swi SYS_ify(socketcall)
-
- str r0, [sp, #-4]!
- mov r0, ip
- CDISABLE
- ldr r0, [sp], #4
- ldr lr, [sp], #4
-
- P(POPARGS_,NARGS)
-
- /* r0 is < 0 if there was an error. */
- cmn r0, $124
- RETINSTR(cc, r14)
- b PLTJMP(SYSCALL_ERROR)
-#endif
-
-PSEUDO_END (__socket)
-
-#ifndef NO_WEAK_ALIAS
-weak_alias (__socket, socket)
-#endif
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S b/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S
index 09492d000..09492d000 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S b/ports/sysdeps/unix/sysv/linux/arm/syscall.S
index 3faf919d8..3faf919d8 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/syscall.S
diff --git a/ports/sysdeps/unix/sysv/linux/arm/syscalls.list b/ports/sysdeps/unix/sysv/linux/arm/syscalls.list
index 820602b79..b8852d940 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/ports/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -1,9 +1,36 @@
# File name Caller Syscall name # args Strong name Weak names
-syscall - syscall 7 syscall
-oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
-oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
-
prlimit64 EXTRA prlimit64 i:iipp prlimit64
fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark
+
+# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
+# wrappers (to set __IPC_64).
+msgget - msgget i:ii __msgget msgget
+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
+shmat - shmat i:ipi __shmat shmat
+shmdt - shmdt i:s __shmdt shmdt
+shmget - shmget i:iii __shmget shmget
+semop - semop i:ipi __semop semop
+semtimedop - semtimedop i:ipip semtimedop
+semget - semget i:iii __semget semget
+
+# proper socket implementations:
+accept - accept Ci:iBN __libc_accept __accept accept
+bind - bind i:ipi __bind bind
+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
+getpeername - getpeername i:ipp __getpeername getpeername
+getsockname - getsockname i:ipp __getsockname getsockname
+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
+listen - listen i:ii __listen listen
+recv - recv Ci:ibni __libc_recv __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
+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
+shutdown - shutdown i:ii __shutdown shutdown
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiif __socketpair socketpair
diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
index 4d08ea9e4..be67c211d 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -29,6 +28,16 @@
#include <tls.h>
+#if __NR_SYSCALL_BASE != 0
+# error Kernel headers are too old
+#endif
+
+/* Don't use stime, even if the kernel headers define it. We have
+ settimeofday, and some EABI kernels have removed stime. Similarly
+ use setitimer to implement alarm. */
+#undef __NR_stime
+#undef __NR_alarm
+
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__
#include <errno.h>
@@ -163,8 +172,14 @@ __local_syscall_error: \
# define SYSCALL_ERROR __syscall_error
#endif
+/* The ARM EABI user interface passes the syscall number in r7, instead
+ of in the swi. This is more efficient, because the kernel does not need
+ to fetch the swi from memory to find out the number; which can be painful
+ with separate I-cache and D-cache. Make sure to use 0 for the SWI
+ argument; otherwise the (optional) compatibility code for APCS binaries
+ may be invoked. */
+
/* Linux takes system call args in registers:
- syscall number in the SWI instruction
arg 1 r0
arg 2 r1
arg 3 r2
@@ -190,58 +205,111 @@ __local_syscall_error: \
*/
+/* We must save and restore r7 (call-saved) for the syscall number.
+ We never make function calls from inside here (only potentially
+ signal handlers), so we do not bother with doubleword alignment.
+
+ Just like the APCS syscall convention, the EABI syscall convention uses
+ r0 through r6 for up to seven syscall arguments. None are ever passed to
+ the kernel on the stack, although incoming arguments are on the stack for
+ syscalls with five or more arguments.
+
+ The assembler will convert the literal pool load to a move for most
+ syscalls. */
+
#undef DO_CALL
#define DO_CALL(syscall_name, args) \
DOARGS_##args; \
- swi SYS_ify (syscall_name); \
+ ldr r7, =SYS_ify (syscall_name); \
+ swi 0x0; \
UNDOARGS_##args
-#define DOARGS_0 /* nothing */
-#define DOARGS_1 /* nothing */
-#define DOARGS_2 /* nothing */
-#define DOARGS_3 /* nothing */
-#define DOARGS_4 /* nothing */
-#define DOARGS_5 \
- str r4, [sp, $-4]!; \
+#undef DOARGS_0
+#define DOARGS_0 \
+ .fnstart; \
+ str r7, [sp, #-4]!; \
cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (r7, 0); \
+ .save { r7 }
+#undef DOARGS_1
+#define DOARGS_1 DOARGS_0
+#undef DOARGS_2
+#define DOARGS_2 DOARGS_0
+#undef DOARGS_3
+#define DOARGS_3 DOARGS_0
+#undef DOARGS_4
+#define DOARGS_4 DOARGS_0
+#undef DOARGS_5
+#define DOARGS_5 \
+ .fnstart; \
+ stmfd sp!, {r4, r7}; \
+ cfi_adjust_cfa_offset (8); \
cfi_rel_offset (r4, 0); \
- ldr r4, [sp, $4]
+ cfi_rel_offset (r7, 4); \
+ .save { r4, r7 }; \
+ ldr r4, [sp, #8]
+#undef DOARGS_6
#define DOARGS_6 \
+ .fnstart; \
mov ip, sp; \
- stmfd sp!, {r4, r5}; \
- cfi_adjust_cfa_offset (8); \
+ stmfd sp!, {r4, r5, r7}; \
+ cfi_adjust_cfa_offset (12); \
cfi_rel_offset (r4, 0); \
cfi_rel_offset (r5, 4); \
+ cfi_rel_offset (r7, 8); \
+ .save { r4, r5, r7 }; \
ldmia ip, {r4, r5}
+#undef DOARGS_7
#define DOARGS_7 \
+ .fnstart; \
mov ip, sp; \
- stmfd sp!, {r4, r5, r6}; \
- cfi_adjust_cfa_offset (12); \
+ stmfd sp!, {r4, r5, r6, r7}; \
+ cfi_adjust_cfa_offset (16); \
cfi_rel_offset (r4, 0); \
cfi_rel_offset (r5, 4); \
cfi_rel_offset (r6, 8); \
+ cfi_rel_offset (r7, 12); \
+ .save { r4, r5, r6, r7 }; \
ldmia ip, {r4, r5, r6}
-#define UNDOARGS_0 /* nothing */
-#define UNDOARGS_1 /* nothing */
-#define UNDOARGS_2 /* nothing */
-#define UNDOARGS_3 /* nothing */
-#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 \
- ldr r4, [sp], $4; \
+#undef UNDOARGS_0
+#define UNDOARGS_0 \
+ ldr r7, [sp], #4; \
cfi_adjust_cfa_offset (-4); \
- cfi_restore (r4)
-#define UNDOARGS_6 \
- ldmfd sp!, {r4, r5}; \
+ cfi_restore (r7); \
+ .fnend
+#undef UNDOARGS_1
+#define UNDOARGS_1 UNDOARGS_0
+#undef UNDOARGS_2
+#define UNDOARGS_2 UNDOARGS_0
+#undef UNDOARGS_3
+#define UNDOARGS_3 UNDOARGS_0
+#undef UNDOARGS_4
+#define UNDOARGS_4 UNDOARGS_0
+#undef UNDOARGS_5
+#define UNDOARGS_5 \
+ ldmfd sp!, {r4, r7}; \
cfi_adjust_cfa_offset (-8); \
cfi_restore (r4); \
- cfi_restore (r5)
-#define UNDOARGS_7 \
- ldmfd sp!, {r4, r5, r6}; \
+ cfi_restore (r7); \
+ .fnend
+#undef UNDOARGS_6
+#define UNDOARGS_6 \
+ ldmfd sp!, {r4, r5, r7}; \
cfi_adjust_cfa_offset (-12); \
cfi_restore (r4); \
cfi_restore (r5); \
- cfi_restore (r6)
+ cfi_restore (r7); \
+ .fnend
+#undef UNDOARGS_7
+#define UNDOARGS_7 \
+ ldmfd sp!, {r4, r5, r6, r7}; \
+ cfi_adjust_cfa_offset (-16); \
+ cfi_restore (r4); \
+ cfi_restore (r5); \
+ cfi_restore (r6); \
+ cfi_restore (r7); \
+ .fnend
#else /* not __ASSEMBLER__ */
@@ -260,19 +328,46 @@ __local_syscall_error: \
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
- ({ unsigned int _sys_result; \
- { \
- register int _a1 asm ("a1"); \
+#if defined(__thumb__)
+/* We can not expose the use of r7 to the compiler. GCC (as
+ of 4.5) uses r7 as the hard frame pointer for Thumb - although
+ for Thumb-2 it isn't obviously a better choice than r11.
+ And GCC does not support asms that conflict with the frame
+ pointer.
+
+ This would be easier if syscall numbers never exceeded 255,
+ but they do. For the moment the LOAD_ARGS_7 is sacrificed.
+ We can't use push/pop inside the asm because that breaks
+ unwinding (i.e. thread cancellation) for this frame. We can't
+ locally save and restore r7, because we do not know if this
+ function uses r7 or if it is our caller's r7; if it is our caller's,
+ then unwinding will fail higher up the stack. So we move the
+ syscall out of line and provide its own unwind information. */
+# undef INTERNAL_SYSCALL_RAW
+# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+ ({ \
+ register int _a1 asm ("a1"); \
+ int _nametmp = name; \
+ LOAD_ARGS_##nr (args) \
+ register int _name asm ("ip") = _nametmp; \
+ asm volatile ("bl __libc_do_syscall" \
+ : "=r" (_a1) \
+ : "r" (_name) ASM_ARGS_##nr \
+ : "memory", "lr"); \
+ _a1; })
+#else /* ARM */
+# undef INTERNAL_SYSCALL_RAW
+# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+ ({ \
+ register int _a1 asm ("r0"), _nr asm ("r7"); \
LOAD_ARGS_##nr (args) \
- asm volatile ("swi %1 @ syscall " #name \
+ _nr = name; \
+ asm volatile ("swi 0x0 @ syscall " #name \
: "=r" (_a1) \
- : "i" (name) ASM_ARGS_##nr \
+ : "r" (_nr) ASM_ARGS_##nr \
: "memory"); \
- _sys_result = _a1; \
- } \
- (int) _sys_result; })
+ _a1; })
+#endif
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
@@ -321,29 +416,18 @@ __local_syscall_error: \
LOAD_ARGS_5 (a1, a2, a3, a4, a5) \
register int _v2 asm ("v2") = _v2tmp;
#define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2)
-#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \
- int _v3tmp = (int) (a7); \
- LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \
+#ifndef __thumb__
+# define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \
+ int _v3tmp = (int) (a7); \
+ LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \
register int _v3 asm ("v3") = _v3tmp;
-#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
-
-/* We can't implement non-constant syscalls directly since the syscall
- number is normally encoded in the instruction. So use SYS_syscall. */
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_NCS_##nr (number, err, args)
-
-#define INTERNAL_SYSCALL_NCS_0(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 1, number, args)
-#define INTERNAL_SYSCALL_NCS_1(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 2, number, args)
-#define INTERNAL_SYSCALL_NCS_2(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 3, number, args)
-#define INTERNAL_SYSCALL_NCS_3(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 4, number, args)
-#define INTERNAL_SYSCALL_NCS_4(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 5, number, args)
-#define INTERNAL_SYSCALL_NCS_5(number, err, args...) \
- INTERNAL_SYSCALL (syscall, err, 6, number, args)
+# define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
+#endif
+
+/* For EABI, non-constant syscalls are actually pretty easy... */
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW (number, err, nr, args)
#endif /* __ASSEMBLER__ */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/ports/sysdeps/unix/sysv/linux/arm/truncate64.c
index 409bf1933..409bf1933 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/truncate64.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/ports/sysdeps/unix/sysv/linux/arm/umount.c
index d9d671f88..d9d671f88 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/umount.c
diff --git a/ports/sysdeps/unix/sysv/linux/arm/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/vfork.S
index cbd42e861..99c366d2b 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -32,7 +32,6 @@ ENTRY (__vfork)
#ifdef SAVE_PID
SAVE_PID
#endif
-#ifdef __ARM_EABI__
/* The DO_CALL macro saves r7 on the stack, to enable generation
of ARM unwind info. Since the stack is initially shared between
parent and child of vfork, that saved value could be corrupted.
@@ -51,9 +50,6 @@ ENTRY (__vfork)
cfi_adjust_cfa_offset (-4)
mov r7, ip
cfi_restore (r7);
-#else
- swi SYS_ify(vfork)
-#endif
#ifdef RESTORE_PID
RESTORE_PID
#endif
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 864f9ea6f..f36193222 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,6 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009, 2011
- 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
@@ -63,6 +62,8 @@
# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
+# define MAP_STACK 0x20000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
/* Flags to `msync'. */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
index b5b967ce9..80170c3e8 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/arm/eabi/readahead.c>
+#include <sysdeps/unix/sysv/linux/arm/readahead.c>
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h b/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h
index 902176356..d5d06f719 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h b/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h
index 3338695bc..9907bbf24 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format: