diff options
Diffstat (limited to 'libc')
217 files changed, 5556 insertions, 3991 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. @@ -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 TRNH) Kh´ng c³ phiŞn báş£n Ä£ biáşżt ?" +msgstr "(LáğI CHĈŻĈ NG TRNH) 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 TRNH) 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 BN HAY KHẢ NÄNG LM ÄĈŻáğ˘C VIáğC Dáğ¨T KHOT.\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 "kch cáğĦ con tráğ kh´ng háğ£p láğ" msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n" msgstr "Sáğ dáğng: xtrace [TY CHáğN]... CHĈŻĈ NG TRNH [TY_CHáğN_CHĈŻĈ NG_TRNH]...\\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áğ ijng 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 "kch 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_SCH] [-o TN_TáğP_TIN] [-T TáğI_DANH_SCH] [--exit]\n" +"\t [--follow] [--from TáğŞ_DANH_SCH] [--output TN_TáğP_TIN] [--to TáğI_DANH_SCH]\\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 tch 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 ijng 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 ij" @@ -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 chnh 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 kch 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³ kch 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 chnh ÄĈ°áğ£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=TN] [--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_TRNH [TY_CHáğN_CHĈŻĈ NG_TRNH]..." +"\t [--buffer=Cáğ ] [--no-timer] [--time-based] [--total]\n" +"\t [--title=CHUáğI] [--x-size=Cáğ ] [--y-size=Cáğ ]\n" +"\t CHĈŻĈ NG_TRNH [TY_CHáğN_CHĈŻĈ NG_TRNH]..." #: 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 chnh ÂĞ %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 "kch cáğĦ phần Äầu kh´ng tĈ°ĈĦng áğİng" -#: nscd/connections.c:593 +#: nscd/connections.c:588 msgid "file size does not match" msgstr "kch 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 "kch 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áş½ ijng 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áş½ ijng 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 "kch 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 chnh 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 chnh 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 chnh 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 chnh 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 chnh 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 chnh 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 tnh Äáğ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 "Tn hiáğu Ä£ gáği báği kill()" + +#: stdio-common/psiginfo.c:148 +msgid "Signal sent by sigqueue()" +msgstr "Tn hiáğu Ä£ gáği báği sigqueue()" + +#: stdio-common/psiginfo.c:151 +msgid "Signal generated by the expiration of a timer" +msgstr "Tn 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 "Tn 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 "Tn 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 "Tn 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 "Tn 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 "Tn 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 "Tn hiáğu ÄĈ°áğ£c gáği báği nh˘n" + +#: stdio-common/psiginfo.c:204 +#, c-format +msgid "Unknown signal %d\n" +msgstr "Tn 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%sTn hiáğu kh´ng rµ %d\n" msgid "Unknown signal" msgstr "Tn 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 "Tn hiáğu tháği gian tháğħc %d" msgid "Unknown signal %d" msgstr "Tn 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 thch 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 tn 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 thch 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\tkch cáğĦ áğ ij 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 ijng %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 trch 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/fxstat.c b/libc/sysdeps/sh/sh4/fpu/feupdateenv.c index 4ebb93782..96a697914 100644 --- a/libc/sysdeps/unix/fxstat.c +++ b/libc/sysdeps/sh/sh4/fpu/feupdateenv.c @@ -1,6 +1,7 @@ -/* fxstat using old-style Unix fstat system call. - Copyright (C) 1991,1995,1996,1997,2000,2002 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 @@ -16,24 +17,23 @@ 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> +#include <fenv.h> +#include <fpu_control.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) +feupdateenv (const fenv_t *envp) { - if (vers != _STAT_VER) - { - __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 __syscall_fstat (fd, CHECK_1 (buf)); + return 0; } -hidden_def (__fxstat) -weak_alias (__fxstat, _fxstat) +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/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/tcflush.c b/libc/sysdeps/unix/sysv/tcflush.c deleted file mode 100644 index 9051911bc..000000000 --- a/libc/sysdeps/unix/sysv/tcflush.c +++ /dev/null @@ -1,44 +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 <termios.h> -#include <unistd.h> -#include <sys/ioctl.h> - -#include <sysv_termio.h> - -/* Flush pending data on FD. */ -int -tcflush (fd, queue_selector) - int fd; - int queue_selector; -{ - 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; - } -} 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" |