summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/ChangeLog203
-rw-r--r--libc/NEWS24
-rw-r--r--libc/config.make.in4
-rwxr-xr-xlibc/configure2410
-rw-r--r--libc/configure.in60
-rw-r--r--libc/crypt/Makefile19
-rw-r--r--libc/crypt/md5-crypt.c138
-rw-r--r--libc/crypt/sha256-crypt.c149
-rw-r--r--libc/crypt/sha512-crypt.c149
-rw-r--r--libc/elf/dl-addr.c4
-rw-r--r--libc/elf/dl-caller.c4
-rw-r--r--libc/elf/dl-close.c16
-rw-r--r--libc/elf/dl-fini.c4
-rw-r--r--libc/elf/dl-iteratephdr.c4
-rw-r--r--libc/elf/dl-libc.c4
-rw-r--r--libc/elf/dl-load.c12
-rw-r--r--libc/elf/dl-minimal.c14
-rw-r--r--libc/elf/dl-misc.c13
-rw-r--r--libc/elf/dl-open.c32
-rw-r--r--libc/elf/dl-support.c1
-rw-r--r--libc/elf/dl-sym.c4
-rw-r--r--libc/elf/do-lookup.h14
-rw-r--r--libc/elf/elf.h16
-rw-r--r--libc/elf/rtld.c13
-rw-r--r--libc/localedata/ChangeLog17
-rw-r--r--libc/localedata/charmaps/UTF-870
-rw-r--r--libc/localedata/locales/ks_IN211
-rw-r--r--libc/localedata/locales/ks_IN@devanagari50
-rw-r--r--libc/malloc/Versions3
-rw-r--r--libc/malloc/hooks.c26
-rw-r--r--libc/malloc/malloc.c179
-rw-r--r--libc/malloc/malloc.h4
-rw-r--r--libc/misc/Makefile2
-rw-r--r--libc/misc/Versions3
-rw-r--r--libc/misc/preadv.c41
-rw-r--r--libc/misc/preadv64.c41
-rw-r--r--libc/misc/pwritev.c41
-rw-r--r--libc/misc/pwritev64.c41
-rw-r--r--libc/misc/sys/uio.h83
-rw-r--r--libc/nptl_db/ChangeLog5
-rw-r--r--libc/nptl_db/td_symbol_list.c4
-rw-r--r--libc/po/fr.po1433
-rw-r--r--libc/resolv/nss_dns/dns-host.c2
-rw-r--r--libc/resolv/res_hconf.c2
-rw-r--r--libc/resolv/res_init.c3
-rw-r--r--libc/resolv/res_send.c37
-rw-r--r--libc/resolv/resolv.h1
-rwxr-xr-xlibc/scripts/check-local-headers.sh5
-rw-r--r--libc/stdio-common/Makefile1
-rw-r--r--libc/stdio-common/Versions1
-rw-r--r--libc/stdio-common/printf-parse.h23
-rw-r--r--libc/stdio-common/printf-parsemb.c123
-rw-r--r--libc/stdio-common/printf-prs.c7
-rw-r--r--libc/stdio-common/printf.h49
-rw-r--r--libc/stdio-common/reg-modifier.c202
-rw-r--r--libc/stdio-common/reg-printf.c46
-rw-r--r--libc/stdio-common/reg-type.c62
-rw-r--r--libc/stdio-common/vfprintf.c108
-rw-r--r--libc/string/Makefile2
-rw-r--r--libc/string/stratcliff.c34
-rw-r--r--libc/string/strverscmp.c6
-rw-r--r--libc/string/tst-svc.expect2
-rw-r--r--libc/string/tst-svc.input2
-rw-r--r--libc/sysdeps/generic/ldsodefs.h7
-rw-r--r--libc/sysdeps/posix/preadv.c108
-rw-r--r--libc/sysdeps/posix/preadv64.c9
-rw-r--r--libc/sysdeps/posix/pwritev.c108
-rw-r--r--libc/sysdeps/posix/pwritev64.c9
-rw-r--r--libc/sysdeps/posix/readv.c40
-rw-r--r--libc/sysdeps/posix/writev.c42
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/socket.h12
-rw-r--r--libc/sysdeps/unix/sysv/linux/kernel-features.h15
-rw-r--r--libc/sysdeps/unix/sysv/linux/preadv.c93
-rw-r--r--libc/sysdeps/unix/sysv/linux/preadv64.c6
-rw-r--r--libc/sysdeps/unix/sysv/linux/pwritev.c93
-rw-r--r--libc/sysdeps/unix/sysv/linux/pwritev64.c6
-rw-r--r--libc/sysdeps/unix/sysv/linux/readv.c46
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/eventfd.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/wordsize-64/preadv64.c1
-rw-r--r--libc/sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c1
-rw-r--r--libc/sysdeps/unix/sysv/linux/writev.c45
-rw-r--r--libc/sysdeps/x86_64/memchr.S66
-rw-r--r--libc/sysdeps/x86_64/rawmemchr.S54
-rw-r--r--libc/sysdeps/x86_64/strchr.S313
-rw-r--r--libc/sysdeps/x86_64/strchrnul.S63
-rw-r--r--libc/sysdeps/x86_64/strlen.S145
-rw-r--r--libc/sysdeps/x86_64/strrchr.S81
-rw-r--r--libc/wcsmbs/wcsatcliff.c1
-rw-r--r--ports/ChangeLog.mips20
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/socket.h12
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/kernel-features.h6
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/readelflib.c7
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h2
93 files changed, 4968 insertions, 2728 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 7c6bae16b..283f49bb5 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,206 @@
+2009-04-13 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/x86-64/strrchr.S: New file.
+
+2009-04-10 Ulrich Drepper <drepper@redhat.com>
+
+ * stdio-common/printf.h (struct printf_info): Add user element.
+ New types printf_arginfo_size_function, printf_va_arg_function.
+ Declare register_printf_specifier, register_printf_modifier,
+ register_printf_type.
+ * stdio-common/printf-parse.h (struct printf_spec): Add size element.
+ (union printf_arg): Add pa_user element.
+ Adjust __printf_arginfo_table type.
+ Add __printf_va_arg_table, __printf_modifier_table,
+ __handle_registered_modifier_mb, and __handle_registered_modifier_wc
+ declarations.
+ * stdio-common/printf-parsemb.c: Recognize registered modifiers.
+ If registered arginfo call failed try normal specifier.
+ * stdio-common/printf-prs.c: Pass additional parameter to arginfo
+ function.
+ * stdio-common/Makefile (routines): Add reg-modifier and reg-type.
+ * stdio-common/Versions: Export register_printf_modifier,
+ register_printf_type, and register_printf_specifier for GLIBC_2.10.
+ * stdio-common/reg-modifier.c: New file.
+ * stdio-common/reg-type.c: New file.
+ * stdio-common/reg-printf.c (__register_printf_specifier): New
+ function. Mostly the old __register_printf_function function but
+ uses locking and type of third parameter changed.
+ (__register_printf_function): Implement using
+ __register_printf_specifier.
+ * stdio-common/vfprintf.c (vfprintf): Collect argument sizes in
+ calls to arginfo functions. Allocate enough memory for user-defined
+ types. Call new va_arg functions to get user-defined types.
+ Try installed handlers even for existing format specifiers first.
+
+2009-04-09 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/x86_64/rawmemchr.S: New file.
+
+ * stdio-common/vfprintf.c (vfprintf): Slightly more compact code.
+ Simplified code and possible copy problem fixed.
+
+ * sysdeps/unix/sysv/linux/preadv.c: Avoid prototype for static
+ function if it is not defined. Add some necessary casts.
+ * sysdeps/unix/sysv/linux/pwritev.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: SPARC and IA64 also
+ have preadv/pwritev in 2.6.30.
+
+2009-04-08 Ulrich Drepper <drepper@redhat.com>
+
+ * malloc/malloc.c (malloc_info): New function.
+ * malloc/malloc.h: Declare it.
+ * malloc/Versions: Export malloc_info for GLIBC_2.10.
+
+ * sysdeps/unix/sysv/linux/preadv64.c (PREAD): Use __libc_pread64
+ to avoid PLT slot.
+
+ * malloc/malloc.c (_int_realloc): Add parameter with old block
+ size. Remove duplicated test. Don't handle mmap'ed blocks here.
+ Adjust all callers.
+ * malloc/hooks.c (realloc_check): Adjust _int_realloc call.
+
+2009-04-07 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/x86_64/strchrnul.S: New file.
+
+ * crypt/Makefile (LDLIBS-crypt.so): Use this variable instead of
+ depending libcrypt on -lfreebl3.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: Power also has
+ preadv/pwritev in 2.6.30.
+
+ * resolv/nss_dns/dns-host.c (getanswer_r): Use strcasecmp
+ instead of __strcasecmp.
+
+ * string/stratcliff.c (do_test): Add memchr tests..
+ * wcsmbs/wcsatcliff.c (MEMCHR): Define.
+ * sysdeps/x86_64/memchr.S: Fix handling of end of buffer after
+ first read quad word.
+
+2009-04-06 Ulrich Drepper <drepper@redhat.com>
+
+ * string/strverscmp.c (__strverscmp): Fix last cleanups.
+ * string/tst-svc.input: Add new test case.
+ * string/tst-svc.expect: Adjust.
+ * string/Makefile: Don't ignore tst-svc error.
+
+ * sysdeps/x86_64/memchr.S: New file.
+
+ * resolv/resolv.h (RES_SNGLKUP): Define.
+ * resolv/res_init.c (res_setoptions): Recognize single-request option.
+ * resolv/res_send.c (send_dg): If we sent two requests at once and
+ only get one reply before timeout switch to mode where we send the
+ second request only after the first answer has been received.
+
+2009-04-05 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/x86_64/strlen.S: Optimize by using SSE2 instructions.
+ * sysdeps/x86_64/strchr.S: Likewise.
+
+2009-04-03 Ulrich Drepper <drepper@redhat.com>
+
+ * configure.in: We need to test for the compiler earlier.
+
+ * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64.
+ * misc/Versions: Export preadv, preadv64, pwritev, pwritev64 for
+ GLIBC_2.10.
+ * misc/sys/uio.h: Declare preadv, preadv64, pwritev, pwritev64.
+ * sysdeps/unix/sysv/linux/kernel-features.h: Add entries for preadv
+ and pwritev.
+ * misc/preadv.c: New file.
+ * misc/preadv64.c: New file.
+ * misc/pwritev.c: New file.
+ * misc/pwritev64.c: New file.
+ * sysdeps/posx/preadv.c: New file.
+ * sysdeps/posx/preadv64.c: New file.
+ * sysdeps/posx/pwritev.c: New file.
+ * sysdeps/posx/pwritev64.c: New file.
+ * sysdeps/unix/sysv/linux/preadv.c: New file.
+ * sysdeps/unix/sysv/linux/preadv64.c: New file.
+ * sysdeps/unix/sysv/linux/pwritev.c: New file.
+ * sysdeps/unix/sysv/linux/pwritev64.c: New file.
+ * sysdeps/unix/sysv/linux/wordsize-64/preadv64.c: New file.
+ * sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c: New file.
+
+ * sysdeps/unix/sysv/linux/readv.c (__libc_readv): Fix calling of
+ compatibility code.
+ * sysdeps/unix/sysv/linux/writev.c (__libc_writev): Likewise.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: Define
+ __ASSUME_COMPLETE_READV_WRITEV.
+ * sysdeps/unix/sysv/linux/readv.c: No need for userlevel fallback
+ with modern kernels.
+ * sysdeps/unix/sysv/linux/writev.c: Likewise.
+
+ * sysdeps/posix/readv.c: Since read is a cancellation point we have
+ to free a possible malloced buffer in case of cancellation.
+ * sysdeps/posix/writev.c: Likewise for write.
+
+2009-04-02 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/bits/socket.h: Add missing protocol numbers.
+
+ * configure.in: Recognize --enable-nss-crypt.
+ * config.make.in: Add nss-crypt entry.
+ * crypt/Makefile: If nss-crypt==yes, don't build md5.c, sha256.c,
+ sha512.c. Don't run md5test, sha256test, sha512test. Pass -DUSE_NSS
+ and include path for NSS directory to compiler for md5-crypt,
+ sha256-crypt, sha512-crypt. Link libcrypt.so with -lfreebl3.
+ * crypt/md5-crypt.c: If USE_NSS is defined, don't use local hash
+ function implementation, use NSS. Introduce wrappers around the
+ hash function calls. Little code size optimization.
+ * crypt/sha256-crypt.c: Likewise.
+ * crypt/sha512-crypt.c: Likewise.
+ * scripts/check-local-headers.sh: Ignore nss3 directory.
+
+ * configure.in: Rename pic_default to libc_cv_pic_default.
+ * config.make.in: Likewise.
+
+2009-04-01 Roland McGrath <roland@redhat.com>
+
+ * elf/elf.h (R_SPARC_GLOB_JMP): New macro.
+ (R_SPARC_GOTDATA_HIX22, R_SPARC_GOTDATA_LOX10): New macros.
+ (R_SPARC_GOTDATA_OP_HIX22, R_SPARC_GOTDATA_OP_LOX10): Likewise.
+ (R_SPARC_GOTDATA_OP, R_SPARC_H34): Likewise.
+ (R_SPARC_SIZE32, R_SPARC_SIZE64): Likewise.
+ (R_SPARC_GNU_VTINHERIT, R_SPARC_GNU_VTENTRY, R_SPARC_REV32): Likewise.
+ (R_SPARC_NUM): Update.
+ From Dave Miller <davem@davemloft.net>.
+
+2009-04-01 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sys/eventfd.h (EFD_SEMAPHORE): Define.
+
+2009-03-31 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/dl-open.c: Keep track of used name spaces and only iterate over
+ those which are used.
+ * elf/dl-addr.c: Likewise.
+ * elf/dl-caller.c: Likewise.
+ * elf/dl-fini.c: Likewise.
+ * elf/dl-iteratephdr.c: Likewise.
+ * elf/dl-libc.c: Likewise.
+ * elf/dl-load.c: Likewise.
+ * elf/dl-support.c: Likewise.
+ * elf/dl-sym.c: Likewise.
+ * elf/rtld.c: Likewise.
+ * sysdeps/generic/ldsodefs.h: Likewise.
+
+ * elf/dl-load.c: Remove support for systems without MAP_ANON.
+ * elf/dl-minimal.c: Likewise.
+ * elf/dl-misc.c: Likewise.
+ * elf/rtld.c: Likewise.
+ * sysdeps/generic/ldsodefs.h: Likewise.
+
+2009-03-30 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/do-lookup.h (do_lookup_x): Minor optimization and cleanup.
+ Avoid reuse of complex expression.
+
+ * po/fr.po: Update from translation team.
+
2009-03-16 Ulrich Drepper <drepper@redhat.com>
* include/dirent.h: Yet more changes to match sort function type
diff --git a/libc/NEWS b/libc/NEWS
index 686d5dfdc..d7e52f898 100644
--- a/libc/NEWS
+++ b/libc/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2009-3-14
+GNU C Library NEWS -- history of user-visible changes. 2009-4-13
Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -7,10 +7,14 @@ using `glibc' in the "product" field.
Version 2.10
+* New interfaces: preadv, preadv64, pwritev, pwritev64, malloc_info
+ Implemented by Ulrich Drepper.
+
* New Linux interfaces: accept4, fallocate, fallocate64.
+ Implemented by Ulrich Drepper.
* Correct declarations of string function when used in C++ code. This
- could lead to compile error for invalid C++ code.
+ could lead to compile errors for invalid C++ code.
* XPG7/POSIX 2008 compilation environment. Many GNU-specific functions are
now in POSIX.
@@ -24,7 +28,21 @@ Version 2.10
* Support for selecting between multiple function definitions at runtime
using STT_GNU_IFUNC symbols. Implemented by Ulrich Drepper.
-* New locale: nan_TW@latin
+* The libcrypt library can now use the hash function implementations in
+ NSS. Implemented by Ulrich Drepper.
+
+* The malloc implementation can be compiled to be less memory efficient
+ but higher performing in multi-threaded programs.
+ Implemented by Ulrich Drepper.
+
+* New locales: nan_TW@latin, ks_IN
+
+* Faster strlen, strchr, strchrnul, strrchr, memchr, and rawmemchr for x86-64.
+ Implemented by Ulrich Drepper.
+
+* Extended printf hook support. It is possible to use user-defined types
+ and extend existing format specifiers.
+ Implemented by Ulrich Drepper.
Version 2.9
diff --git a/libc/config.make.in b/libc/config.make.in
index acc068cbf..45eb56be7 100644
--- a/libc/config.make.in
+++ b/libc/config.make.in
@@ -81,10 +81,12 @@ sizeof-long-double = @sizeof_long_double@
experimental-malloc = @experimental_malloc@
+nss-crypt = @libc_cv_nss_crypt@
+
# Configuration options.
build-static = @static@
build-shared = @shared@
-build-pic-default= @pic_default@
+build-pic-default= @libc_cv_pic_default@
build-profile = @profile@
build-omitfp = @omitfp@
build-bounded = @bounded@
diff --git a/libc/configure b/libc/configure
index 4008daf01..a8b25a30c 100755
--- a/libc/configure
+++ b/libc/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI multi_arch experimental_malloc build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR NM OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH_SHELL libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_gnu89_inline libc_cv_have_initfini no_whole_archive exceptions libc_cv_cc_submachine LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind libc_cv_cpp_asm_debuginfo use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI multi_arch experimental_malloc libc_cv_nss_crypt build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S AR NM OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH_SHELL libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_gnu89_inline libc_cv_have_initfini no_whole_archive exceptions libc_cv_cc_submachine LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind libc_cv_cpp_asm_debuginfo use_ldconfig ldd_rewrite_script elf xcoff static shared libc_cv_pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -891,6 +891,7 @@ Optional Features:
architectures
--enable-experimental-malloc
enable experimental malloc features
+ --enable-nss-crypt enable libcrypt to use nss
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1402,1131 +1403,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
- { { echo "$as_me:$LINENO: error: you must configure in a separate build directory" >&5
-echo "$as_me: error: you must configure in a separate build directory" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# This will get text that should go into config.make.
-config_vars=
-
-# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
-
-# Check whether --with-gd or --without-gd was given.
-if test "${with_gd+set}" = set; then
- withval="$with_gd"
- case "$with_gd" in
-yes|''|no) ;;
-*) libgd_include="-I$withval/include"
- libgd_ldflags="-L$withval/lib" ;;
-esac
-
-fi;
-
-# Check whether --with-gd-include or --without-gd-include was given.
-if test "${with_gd_include+set}" = set; then
- withval="$with_gd_include"
- case "$with_gd_include" in
-''|no) ;;
-*) libgd_include="-I$withval" ;;
-esac
-
-fi;
-
-# Check whether --with-gd-lib or --without-gd-lib was given.
-if test "${with_gd_lib+set}" = set; then
- withval="$with_gd_lib"
- case "$with_gd_lib" in
-''|no) ;;
-*) libgd_ldflags="-L$withval" ;;
-esac
-
-fi;
-
-if test -n "$libgd_include"; then
- config_vars="$config_vars
-CFLAGS-memusagestat.c = $libgd_include"
-fi
-if test -n "$libgd_ldflags"; then
- config_vars="$config_vars
-libgd-LDFLAGS = $libgd_ldflags"
-fi
-
-
-# Check whether --with-fp or --without-fp was given.
-if test "${with_fp+set}" = set; then
- withval="$with_fp"
- with_fp=$withval
-else
- with_fp=yes
-fi;
-
-
-# Check whether --with-binutils or --without-binutils was given.
-if test "${with_binutils+set}" = set; then
- withval="$with_binutils"
- path_binutils=$withval
-else
- path_binutils=''
-fi;
-
-# Check whether --with-elf or --without-elf was given.
-if test "${with_elf+set}" = set; then
- withval="$with_elf"
- elf=$withval
-else
- elf=no
-fi;
-
-# Check whether --with-selinux or --without-selinux was given.
-if test "${with_selinux+set}" = set; then
- withval="$with_selinux"
- with_selinux=$withval
-else
- with_selinux=auto
-fi;
-
-# Check whether --with-xcoff or --without-xcoff was given.
-if test "${with_xcoff+set}" = set; then
- withval="$with_xcoff"
- xcoff=$withval
-else
- xcoff=no
-fi;
-
-# Check whether --with-cvs or --without-cvs was given.
-if test "${with_cvs+set}" = set; then
- withval="$with_cvs"
- with_cvs=$withval
-else
- with_cvs=yes
-fi;
-if test "$with_cvs" = yes; then
- if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
- then
- with_cvs=no
- fi
-fi
-
-
-
-# Check whether --with-headers or --without-headers was given.
-if test "${with_headers+set}" = set; then
- withval="$with_headers"
- sysheaders=$withval
-else
- sysheaders=''
-fi;
-
-# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
-if test "${enable_sanity_checks+set}" = set; then
- enableval="$enable_sanity_checks"
- enable_sanity=$enableval
-else
- enable_sanity=yes
-fi;
-
-
-# Check whether --enable-check-abi or --disable-check-abi was given.
-if test "${enable_check_abi+set}" = set; then
- enableval="$enable_check_abi"
- enable_check_abi=$enableval
-else
- enable_check_abi=no
-fi;
-
-static=yes
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- shared=$enableval
-else
- shared=default
-fi;
-# Check whether --enable-profile or --disable-profile was given.
-if test "${enable_profile+set}" = set; then
- enableval="$enable_profile"
- profile=$enableval
-else
- profile=no
-fi;
-# Check whether --enable-omitfp or --disable-omitfp was given.
-if test "${enable_omitfp+set}" = set; then
- enableval="$enable_omitfp"
- omitfp=$enableval
-else
- omitfp=no
-fi;
-# Check whether --enable-bounded or --disable-bounded was given.
-if test "${enable_bounded+set}" = set; then
- enableval="$enable_bounded"
- bounded=$enableval
-else
- bounded=no
-fi;
-# Check whether --enable-versioning or --disable-versioning was given.
-if test "${enable_versioning+set}" = set; then
- enableval="$enable_versioning"
- enable_versioning=$enableval
-else
- enable_versioning=yes
-fi;
-
-# Check whether --enable-oldest-abi or --disable-oldest-abi was given.
-if test "${enable_oldest_abi+set}" = set; then
- enableval="$enable_oldest_abi"
- oldest_abi=$enableval
-else
- oldest_abi=no
-fi;
-if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
- oldest_abi=default
-else
- cat >>confdefs.h <<_ACEOF
-#define GLIBC_OLDEST_ABI "$oldest_abi"
-_ACEOF
-
-fi
-
-
-# Check whether --enable-stackguard-randomization or --disable-stackguard-randomization was given.
-if test "${enable_stackguard_randomization+set}" = set; then
- enableval="$enable_stackguard_randomization"
- enable_stackguard_randomize=$enableval
-else
- enable_stackguard_randomize=no
-fi;
-if test "$enable_stackguard_randomize" = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define ENABLE_STACKGUARD_RANDOMIZE 1
-_ACEOF
-
-fi
-
-# Check whether --enable-add-ons or --disable-add-ons was given.
-if test "${enable_add_ons+set}" = set; then
- enableval="$enable_add_ons"
-
-else
- enable_add_ons=yes
-fi;
-
-
-# Check whether --with-tls or --without-tls was given.
-if test "${with_tls+set}" = set; then
- withval="$with_tls"
- usetls=$withval
-else
- usetls=yes
-fi;
-
-
-# Check whether --with-__thread or --without-__thread was given.
-if test "${with___thread+set}" = set; then
- withval="$with___thread"
- use__thread=$withval
-else
- use__thread=yes
-fi;
-
-# Check whether --enable-hidden-plt or --disable-hidden-plt was given.
-if test "${enable_hidden_plt+set}" = set; then
- enableval="$enable_hidden_plt"
- hidden=$enableval
-else
- hidden=yes
-fi;
-if test "x$hidden" = xno; then
- cat >>confdefs.h <<\_ACEOF
-#define NO_HIDDEN 1
-_ACEOF
-
-fi
-
-# Check whether --enable-bind-now or --disable-bind-now was given.
-if test "${enable_bind_now+set}" = set; then
- enableval="$enable_bind_now"
- bindnow=$enableval
-else
- bindnow=no
-fi;
-
-
-# Check whether --enable-static-nss or --disable-static-nss was given.
-if test "${enable_static_nss+set}" = set; then
- enableval="$enable_static_nss"
- static_nss=$enableval
-else
- static_nss=no
-fi;
-if test x"$static_nss" = xyes || test x"$shared" = xno; then
- static_nss=yes
- cat >>confdefs.h <<\_ACEOF
-#define DO_STATIC_NSS 1
-_ACEOF
-
-fi
-
-# Check whether --enable-force-install or --disable-force-install was given.
-if test "${enable_force_install+set}" = set; then
- enableval="$enable_force_install"
- force_install=$enableval
-else
- force_install=yes
-fi;
-
-
-# Check whether --enable-kernel or --disable-kernel was given.
-if test "${enable_kernel+set}" = set; then
- enableval="$enable_kernel"
- minimum_kernel=$enableval
-fi;
-if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
- # Better nothing than this.
- minimum_kernel=""
-else
- if test "$minimum_kernel" = current; then
- minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel=
- fi
-fi
-
-# Check whether --enable-all-warnings or --disable-all-warnings was given.
-if test "${enable_all_warnings+set}" = set; then
- enableval="$enable_all_warnings"
- all_warnings=$enableval
-fi;
-
-
-
-
-# Check whether --with-pkgversion or --without-pkgversion was given.
-if test "${with_pkgversion+set}" = set; then
- withval="$with_pkgversion"
- case "$withval" in
- yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
-echo "$as_me: error: package version not specified" >&2;}
- { (exit 1); exit 1; }; } ;;
- no) PKGVERSION= ;;
- *) PKGVERSION="($withval) " ;;
- esac
-else
- PKGVERSION="(EGLIBC) "
-
-fi;
-
-
-
-
-# Check whether --with-bugurl or --without-bugurl was given.
-if test "${with_bugurl+set}" = set; then
- withval="$with_bugurl"
- case "$withval" in
- yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
-echo "$as_me: error: bug URL not specified" >&2;}
- { (exit 1); exit 1; }; } ;;
- no) BUGURL=
- ;;
- *) BUGURL="$withval"
- ;;
- esac
-else
- BUGURL="http://www.eglibc.org/issues/"
-
-fi;
- case ${BUGURL} in
- "")
- REPORT_BUGS_TO=
- REPORT_BUGS_TEXI=
- ;;
- *)
- REPORT_BUGS_TO="<$BUGURL>"
- REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
- ;;
- esac;
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define PKGVERSION "$PKGVERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
-_ACEOF
-
-
-# Check whether --enable-multi-arch or --disable-multi-arch was given.
-if test "${enable_multi_arch+set}" = set; then
- enableval="$enable_multi_arch"
- multi_arch=$enableval
-else
- multi_arch=no
-fi;
-if test x"$multi_arch" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define USE_MULTIARCH 1
-_ACEOF
-
- multi_arch_d=/multiarch
-fi
-
-
-# Check whether --enable-experimental-malloc or --disable-experimental-malloc was given.
-if test "${enable_experimental_malloc+set}" = set; then
- enableval="$enable_experimental_malloc"
- experimental_malloc=$enableval
-fi;
-
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-
-# The way shlib-versions is used to generate soversions.mk uses a
-# fairly simplistic model for name recognition that can't distinguish
-# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
-# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
-# tell. This doesn't get used much beyond that, so it's fairly safe.
-case "$host_os" in
-linux*)
- ;;
-gnu*)
- host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
- ;;
-esac
-
-# We keep the original values in `$config_*' and never modify them, so we
-# can write them unchanged into config.make. Everything else uses
-# $machine, $vendor, and $os, and changes them whenever convenient.
-config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
-
-# Don't allow vendor == "unknown"
-test "$config_vendor" = unknown && config_vendor=
-config_os="`echo $config_os | sed 's/^unknown-//'`"
-
-# Some configurations imply other options.
-case "$host_os" in
-# i586-linuxaout is mangled into i586-pc-linux-gnuaout
-linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
- ;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
- # These systems (almost) always use the ELF format.
- elf=yes
- ;;
-aix*)
- # These systems are always xcoff
- xcoff=yes
- elf=no
- ;;
-esac
-
-# The configure fragment of an add-on port can modify these to supplement
-# or override the table in the case statement below. No fragment should
-# ever change the config_* variables, however.
-machine=$config_machine
-vendor=$config_vendor
-os=$config_os
-base_os=''
-
-# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
-# Unify this here.
-if test "$machine" = rs6000; then
- machine="powerpc"
-fi
-
-# Braindead PowerPC box with absolutely no FPU.
-case "$machine-$host_os" in
- powerpc*-*soft)
- with_fp=no
- ;;
-esac
-
-submachine=
-
-# Check whether --with-cpu or --without-cpu was given.
-if test "${with_cpu+set}" = set; then
- withval="$with_cpu"
- case "$withval" in
- yes|'') { { echo "$as_me:$LINENO: error: --with-cpu requires an argument" >&5
-echo "$as_me: error: --with-cpu requires an argument" >&2;}
- { (exit 1); exit 1; }; } ;;
- no) ;;
- *) submachine="$withval" ;;
- esac
-
-fi;
-
-# An add-on can set this when it wants to disable the sanity check below.
-libc_config_ok=no
-
-
-
-subdirs="$subdirs "
-
-
-case "$enable_add_ons" in
-''|no) add_ons= ;;
-yes|'*')
- add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
- sed 's@/[^/]*$@@' | sort | uniq`
- add_ons_automatic=yes
- ;;
-*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
- add_ons_automatic=no ;;
-esac
-
-configured_add_ons=
-add_ons_sfx=
-add_ons_pfx=
-if test x"$add_ons" != x; then
- for f in $add_ons; do
- # Some sanity checks
- case "$f" in
- crypt)
- { { echo "$as_me:$LINENO: error:
-*** It seems that you're using an old \`crypt' add-on. crypt is now
-*** part of glibc and using the old add-on will not work with this
-*** release. Start again with fresh sources and without the old
-*** \`crypt' add-on." >&5
-echo "$as_me: error:
-*** It seems that you're using an old \`crypt' add-on. crypt is now
-*** part of glibc and using the old add-on will not work with this
-*** release. Start again with fresh sources and without the old
-*** \`crypt' add-on." >&2;}
- { (exit 1); exit 1; }; }
- ;;
- localedata)
- { { echo "$as_me:$LINENO: error:
-*** It seems that you're using an old \`localedata' add-on. localedata
-*** is now part of glibc and using the old add-on will not work with
-*** this release. Start again with fresh sources and without the old
-*** \`localedata' add-on." >&5
-echo "$as_me: error:
-*** It seems that you're using an old \`localedata' add-on. localedata
-*** is now part of glibc and using the old add-on will not work with
-*** this release. Start again with fresh sources and without the old
-*** \`localedata' add-on." >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
- done
-
- # Now source each add-on's configure fragment.
- # The fragments can use $srcdir/$libc_add_on to find themselves,
- # and test $add_ons_automatic to see if they were explicitly requested.
- # A fragment can clear (or even change) $libc_add_on to affect
- # whether it goes into the list to be actually used in the build.
- use_add_ons=
- for libc_add_on in $add_ons; do
- # Test whether such a directory really exists.
- # It can be absolute, or relative to $srcdir, or relative to the build dir.
- case "$libc_add_on" in
- /*)
- libc_add_on_srcdir=$libc_add_on
- ;;
- *)
- test -d "$srcdir/$libc_add_on" || {
- if test -d "$libc_add_on"; then
- libc_add_on="`pwd`/$libc_add_on"
- else
- { { echo "$as_me:$LINENO: error: add-on directory \"$libc_add_on\" does not exist" >&5
-echo "$as_me: error: add-on directory \"$libc_add_on\" does not exist" >&2;}
- { (exit 1); exit 1; }; }
- fi
- }
- libc_add_on_srcdir=$srcdir/$libc_add_on
- ;;
- esac
-
- libc_add_on_frag=$libc_add_on_srcdir/configure
- libc_add_on_canonical=
- if test -r "$libc_add_on_frag"; then
- { echo "$as_me:$LINENO: running configure fragment for add-on $libc_add_on" >&5
-echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;}
- libc_add_on_canonical=unknown
- libc_add_on_subdirs=
- . "$libc_add_on_frag"
- test -z "$libc_add_on" || {
- configured_add_ons="$configured_add_ons $libc_add_on"
- if test "x$libc_add_on_canonical" = xunknown; then
- { { echo "$as_me:$LINENO: error: fragment must set \$libc_add_on_canonical" >&5
-echo "$as_me: error: fragment must set \$libc_add_on_canonical" >&2;}
- { (exit 1); exit 1; }; }
- fi
- for d in $libc_add_on_subdirs; do
- case "$libc_add_on" in
- /*) subdir_srcdir="$libc_add_on" ;;
- *) subdir_srcdir="\$(..)$libc_add_on" ;;
- esac
- case "$d" in
- .)
- d="${libc_add_on_canonical:-$libc_add_on}"
- ;;
- /*)
- subdir_srcdir="$d"
- ;;
- *)
- subdir_srcdir="$subdir_srcdir/$d"
- ;;
- esac
- d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
- add_on_subdirs="$add_on_subdirs $d"
- test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
-$d-srcdir = $subdir_srcdir"
- done
- }
- fi
- if test -n "$libc_add_on"; then
- if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
- then
- echo "$as_me:$LINENO: checking add-on $libc_add_on for preconfigure fragments" >&5
-echo $ECHO_N "checking add-on $libc_add_on for preconfigure fragments... $ECHO_C" >&6
- for frag in $frags; do
- name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
- echo $ECHO_N "$name $ECHO_C" >&6
- . "$frag"
- done
- echo "$as_me:$LINENO: result: " >&5
-echo "${ECHO_T}" >&6
- fi
- use_add_ons="$use_add_ons $libc_add_on"
- add_ons_pfx="$add_ons_pfx $libc_add_on/"
- test -z "$libc_add_on_canonical" ||
- add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
- fi
- done
- # Use echo to strip excess whitespace.
- add_ons="`echo $use_add_ons`"
-fi
-
-
-
-
-###
-### I put this here to prevent those annoying emails from people who cannot
-### read and try to compile glibc on unsupported platforms. --drepper
-###
-### By using the undocumented --enable-hacker-mode option for configure
-### one can skip this test to make the configuration not fail for unsupported
-### platforms.
-###
-if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
- case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
- ;;
- *)
- echo "*** The GNU C library is currently not available for this platform."
- echo "*** So far nobody cared to port it and if there is no volunteer it"
- echo "*** might never happen. So, if you have interest to see glibc on"
- echo "*** this platform visit"
- echo "*** http://www.gnu.org/software/libc/porting.html"
- echo "*** and join the group of porters"
- exit 1
- ;;
- esac
-fi
-
-# Expand the configuration machine name into a subdirectory by architecture
-# type and particular chip. If an add-on configure fragment already set
-# base_machine, we don't change it.
-test -n "$base_machine" || case "$machine" in
-a29k | am29000) base_machine=a29k machine=a29k ;;
-c3[012]) base_machine=cx0 machine=cx0/c30 ;;
-c4[04]) base_machine=cx0 machine=cx0/c40 ;;
-i[34567]86) base_machine=i386 machine=i386/$machine ;;
-ia64) base_machine=ia64 machine=ia64 ;;
-m88???) base_machine=m88k machine=m88k/$machine ;;
-m88k) base_machine=m88k machine=m88k/m88100 ;;
-powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
-powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
-s390) base_machine=s390 machine=s390/s390-32 ;;
-s390x) base_machine=s390 machine=s390/s390-64 ;;
-sh3*) base_machine=sh machine=sh/sh3 ;;
-sh4*) base_machine=sh machine=sh/sh4 ;;
-sparc | sparcv[67])
- base_machine=sparc machine=sparc/sparc32 ;;
-sparcv8 | supersparc | hypersparc)
- base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
-sparcv8plus | sparcv8plusa | sparcv9)
- base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
-sparcv8plusb | sparcv9b)
- base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
-sparcv9v)
- base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;;
-sparcv9v2)
- base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v2 ;;
-sparc64)
- base_machine=sparc machine=sparc/sparc64 ;;
-sparc64b)
- base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
-sparc64v)
- base_machine=sparc machine=sparc/sparc64/sparcv9v ;;
-sparc64v2)
- base_machine=sparc machine=sparc/sparc64/sparcv9v2 ;;
-*) base_machine=$machine ;;
-esac
-
-
-if test "$base_machine" = "i386"; then
- cat >>confdefs.h <<\_ACEOF
-#define USE_REGPARMS 1
-_ACEOF
-
-fi
-
-# Compute the list of sysdep directories for this configuration.
-# This can take a while to compute.
-sysdep_dir=$srcdir/sysdeps
-echo "$as_me:$LINENO: checking sysdep dirs" >&5
-echo $ECHO_N "checking sysdep dirs... $ECHO_C" >&6
-# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
-os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
-
-test "x$base_os" != x || case "$os" in
-gnu*)
- base_os=mach/hurd ;;
-netbsd* | 386bsd* | freebsd* | bsdi*)
- base_os=unix/bsd/bsd4.4 ;;
-osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
- base_os=unix/bsd ;;
-sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
- base_os=unix/sysv ;;
-irix6*)
- base_os=unix/sysv/irix6/$os ;;
-solaris[2-9]*)
- base_os=unix/sysv/sysv4 ;;
-hpux*)
- base_os=unix/sysv/hpux/$os ;;
-aix4.3*)
- base_os=unix/sysv/aix/aix4.3 ;;
-none)
- base_os=standalone ;;
-esac
-
-# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
-tail=$os
-ostry=$os
-while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do
- ostry="$ostry /$o"
- tail=$o
-done
-o=`echo $tail | sed 's/[0-9]*$//'`
-if test $o != $tail; then
- ostry="$ostry /$o"
-fi
-# For linux-gnu, try linux-gnu, then linux.
-o=`echo $tail | sed 's/-.*$//'`
-if test $o != $tail; then
- ostry="$ostry /$o"
-fi
-
-# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
-base=
-tail=$base_os
-while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
- set $b
- base="$base /$1"
- tail="$2"
-done
-
-# For sparc/sparc32, try sparc/sparc32 and then sparc.
-mach=
-tail=$machine${submachine:+/$submachine}
-while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
- set $m
- # Prepend the machine's FPU directory unless --without-fp.
- if test "$with_fp" = yes; then
- mach="$mach /$1/fpu"
- else
- mach="$mach /$1/nofpu"
- fi
- mach="$mach /$1"
- tail="$2"
-done
-
-
-# Find what sysdep directories exist.
-sysnames_add_ons=
-sysnames=
-for b in $base ''; do
- for m0 in $mach ''; do
- for v in /$vendor ''; do
- test "$v" = / && continue
- for o in /$ostry ''; do
- test "$o" = / && continue
- for m in $multi_arch_d $mach ''; do
- for d in $add_ons_pfx ''; do
- for a in $add_ons_sfx ''; do
- if test -n "$m0$m0sub$b$v$o$m$msub"; then
- try_srcdir="${srcdir}/"
- case "$d" in
- /*) try_srcdir= ;;
- esac
- try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
- test -n "$enable_debug_configure" &&
- echo "$0 DEBUG: try $try" >&2
- if test -d "$try_srcdir$try"; then
- sysnames="$sysnames $try"
- { test -n "$o" || test -n "$b"; } && os_used=t
- { test -n "$m" || test -n "$m0"; } && machine_used=t
- case x${m0:-$m} in
- x*/$submachine) submachine_used=t ;;
- esac
- if test -n "$d"; then
- case "$sysnames_add_ons" in
- *" $d "*) ;;
- *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
- esac
- fi
- fi
- fi
- done
- done
- done
- done
- done
- done
-done
-
-if test -z "$os_used" && test "$os" != none; then
- { { echo "$as_me:$LINENO: error: Operating system $os is not supported." >&5
-echo "$as_me: error: Operating system $os is not supported." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "$machine_used" && test "$machine" != none; then
- { { echo "$as_me:$LINENO: error: The $machine is not supported." >&5
-echo "$as_me: error: The $machine is not supported." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "$submachine_used" && test -n "$submachine"; then
- { { echo "$as_me:$LINENO: error: The $submachine subspecies of $host_cpu is not supported." >&5
-echo "$as_me: error: The $submachine subspecies of $host_cpu is not supported." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-# We have now validated the configuration.
-
-
-# If using ELF, look for an `elf' subdirectory of each machine directory.
-# We prepend these rather than inserting them whereever the machine appears
-# because things specified by the machine's ELF ABI should override
-# OS-specific things, and should always be the same for any OS on the
-# machine (otherwise what's the point of an ABI?).
-if test "$elf" = yes; then
- elf_dirs=
- for d in $add_ons_pfx ''; do
- for m in $mach; do
- if test -d $srcdir/${d}sysdeps$m/elf; then
- elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
- fi
- done
- done
- sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
-fi
-
-
-# Expand the list of system names into a full list of directories
-# from each element's parent name and Implies file (if present).
-set $sysnames
-names=
-while test $# -gt 0; do
- name=$1
- shift
-
- case " $names " in *" $name "*)
- # Already in the list.
- continue
- esac
-
- # Report each name as we discover it, so there is no long pause in output.
- echo $ECHO_N "$name $ECHO_C" >&6
-
- name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
-
- case $name in
- /*) xsrcdir= ;;
- *) xsrcdir=$srcdir/ ;;
- esac
- test -n "$enable_debug_configure" &&
- echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2
-
- if test -f $xsrcdir$name/Implies; then
- # Collect more names from the `Implies' file (removing comments).
- implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
- implied=
- for x in $implied_candidate; do
- found=no
- if test -d $xsrcdir$name_base/$x; then
- implied="$implied $name_base/$x";
- found=yes
- fi
- for d in $add_ons_pfx ''; do
- try="${d}sysdeps/$x"
- case $d in
- /*) try_srcdir= ;;
- *) try_srcdir=$srcdir/ ;;
- esac
- test -n "$enable_debug_configure" &&
- echo "DEBUG: $name implied $x try($d) {$try_srcdir}$try" >&2
- if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try;
- then
- implied="$implied $try"
- found=yes
- case "$sysnames_add_ons" in
- *" $d "*) ;;
- *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
- esac
- fi
- done
- if test $found = no; then
- { echo "$as_me:$LINENO: WARNING: $name/Implies specifies nonexistent $x" >&5
-echo "$as_me: WARNING: $name/Implies specifies nonexistent $x" >&2;}
- fi
- done
- else
- implied=
- fi
-
- # Add NAME to the list of names.
- names="$names $name"
-
- # Find the parent of NAME, using the empty string if it has none.
- parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
-
- # Add the names implied by NAME, and NAME's parent (if it has one), to
- # the list of names to be processed (the argument list). We prepend the
- # implied names to the list and append the parent. We want implied
- # directories to come before further directories inferred from the
- # configuration components; this ensures that for sysv4, unix/common
- # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
- # after sysv4).
- sysnames="`echo $implied $* $parent`"
- test -n "$sysnames" && set $sysnames
-done
-
-# Add the default directories.
-default_sysnames=sysdeps/generic
-if test "$elf" = yes; then
- default_sysnames="sysdeps/generic/elf $default_sysnames"
-fi
-sysnames="$names $default_sysnames"
-
-# The other names were emitted during the scan.
-echo "$as_me:$LINENO: result: $default_sysnames" >&5
-echo "${ECHO_T}$default_sysnames" >&6
-
-# Collect the list of add-ons that supply partial sysdeps trees.
-sysdeps_add_ons=
-for add_on in $add_ons; do
- case "$add_on" in
- /*) xsrcdir= ;;
- *) xsrcdir="$srcdir/" ;;
- esac
-
- test -d "$xsrcdir$add_on/sysdeps" || {
- case "$configured_add_ons " in
- *" $add_on "*) ;;
- *|'')
- { { echo "$as_me:$LINENO: error: add-on $add_on has no configure fragment or sysdeps tree" >&5
-echo "$as_me: error: add-on $add_on has no configure fragment or sysdeps tree" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
- continue
- }
-
- sysdeps_add_ons="$sysdeps_add_ons $add_on"
- case "$sysnames_add_ons" in
- *" $add_on/ "*) ;;
- *|'')
- { echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no sysdeps directories" >&5
-echo "$as_me: WARNING: add-on $add_on contributed no sysdeps directories" >&2;}
- continue ;;
- esac
-
- found=no
- for d in $sysnames; do
- case "$d" in
- $add_on/sysdeps/*) ;;
- *) continue ;;
- esac
- (cd "$xsrcdir$d" && for f in *[!~]; do
- case "$f" in
- sys|bits)
- for ff in $f/*.h; do
- test -d "$ff" || { test -e "$ff" && exit 88; }
- done
- ;;
- *)
- test -d "$f" || { test -e "$f" && exit 88; }
- ;;
- esac
- done)
- if test $? -eq 88; then
- found=yes
- break
- fi
- done
- if test $found = no; then
- { echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no useful sysdeps directories" >&5
-echo "$as_me: WARNING: add-on $add_on contributed no useful sysdeps directories" >&2;}
- fi
-done
-
-
-
-### Locate tools.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
- # The makefiles need to use a different form to find it in $srcdir.
- INSTALL='\$(..)./scripts/install-sh -c'
-fi
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3940,6 +2816,1250 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
+ { { echo "$as_me:$LINENO: error: you must configure in a separate build directory" >&5
+echo "$as_me: error: you must configure in a separate build directory" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# This will get text that should go into config.make.
+config_vars=
+
+# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
+
+# Check whether --with-gd or --without-gd was given.
+if test "${with_gd+set}" = set; then
+ withval="$with_gd"
+ case "$with_gd" in
+yes|''|no) ;;
+*) libgd_include="-I$withval/include"
+ libgd_ldflags="-L$withval/lib" ;;
+esac
+
+fi;
+
+# Check whether --with-gd-include or --without-gd-include was given.
+if test "${with_gd_include+set}" = set; then
+ withval="$with_gd_include"
+ case "$with_gd_include" in
+''|no) ;;
+*) libgd_include="-I$withval" ;;
+esac
+
+fi;
+
+# Check whether --with-gd-lib or --without-gd-lib was given.
+if test "${with_gd_lib+set}" = set; then
+ withval="$with_gd_lib"
+ case "$with_gd_lib" in
+''|no) ;;
+*) libgd_ldflags="-L$withval" ;;
+esac
+
+fi;
+
+if test -n "$libgd_include"; then
+ config_vars="$config_vars
+CFLAGS-memusagestat.c = $libgd_include"
+fi
+if test -n "$libgd_ldflags"; then
+ config_vars="$config_vars
+libgd-LDFLAGS = $libgd_ldflags"
+fi
+
+
+# Check whether --with-fp or --without-fp was given.
+if test "${with_fp+set}" = set; then
+ withval="$with_fp"
+ with_fp=$withval
+else
+ with_fp=yes
+fi;
+
+
+# Check whether --with-binutils or --without-binutils was given.
+if test "${with_binutils+set}" = set; then
+ withval="$with_binutils"
+ path_binutils=$withval
+else
+ path_binutils=''
+fi;
+
+# Check whether --with-elf or --without-elf was given.
+if test "${with_elf+set}" = set; then
+ withval="$with_elf"
+ elf=$withval
+else
+ elf=no
+fi;
+
+# Check whether --with-selinux or --without-selinux was given.
+if test "${with_selinux+set}" = set; then
+ withval="$with_selinux"
+ with_selinux=$withval
+else
+ with_selinux=auto
+fi;
+
+# Check whether --with-xcoff or --without-xcoff was given.
+if test "${with_xcoff+set}" = set; then
+ withval="$with_xcoff"
+ xcoff=$withval
+else
+ xcoff=no
+fi;
+
+# Check whether --with-cvs or --without-cvs was given.
+if test "${with_cvs+set}" = set; then
+ withval="$with_cvs"
+ with_cvs=$withval
+else
+ with_cvs=yes
+fi;
+if test "$with_cvs" = yes; then
+ if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
+ then
+ with_cvs=no
+ fi
+fi
+
+
+
+# Check whether --with-headers or --without-headers was given.
+if test "${with_headers+set}" = set; then
+ withval="$with_headers"
+ sysheaders=$withval
+else
+ sysheaders=''
+fi;
+
+# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
+if test "${enable_sanity_checks+set}" = set; then
+ enableval="$enable_sanity_checks"
+ enable_sanity=$enableval
+else
+ enable_sanity=yes
+fi;
+
+
+# Check whether --enable-check-abi or --disable-check-abi was given.
+if test "${enable_check_abi+set}" = set; then
+ enableval="$enable_check_abi"
+ enable_check_abi=$enableval
+else
+ enable_check_abi=no
+fi;
+
+static=yes
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ shared=$enableval
+else
+ shared=default
+fi;
+# Check whether --enable-profile or --disable-profile was given.
+if test "${enable_profile+set}" = set; then
+ enableval="$enable_profile"
+ profile=$enableval
+else
+ profile=no
+fi;
+# Check whether --enable-omitfp or --disable-omitfp was given.
+if test "${enable_omitfp+set}" = set; then
+ enableval="$enable_omitfp"
+ omitfp=$enableval
+else
+ omitfp=no
+fi;
+# Check whether --enable-bounded or --disable-bounded was given.
+if test "${enable_bounded+set}" = set; then
+ enableval="$enable_bounded"
+ bounded=$enableval
+else
+ bounded=no
+fi;
+# Check whether --enable-versioning or --disable-versioning was given.
+if test "${enable_versioning+set}" = set; then
+ enableval="$enable_versioning"
+ enable_versioning=$enableval
+else
+ enable_versioning=yes
+fi;
+
+# Check whether --enable-oldest-abi or --disable-oldest-abi was given.
+if test "${enable_oldest_abi+set}" = set; then
+ enableval="$enable_oldest_abi"
+ oldest_abi=$enableval
+else
+ oldest_abi=no
+fi;
+if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
+ oldest_abi=default
+else
+ cat >>confdefs.h <<_ACEOF
+#define GLIBC_OLDEST_ABI "$oldest_abi"
+_ACEOF
+
+fi
+
+
+# Check whether --enable-stackguard-randomization or --disable-stackguard-randomization was given.
+if test "${enable_stackguard_randomization+set}" = set; then
+ enableval="$enable_stackguard_randomization"
+ enable_stackguard_randomize=$enableval
+else
+ enable_stackguard_randomize=no
+fi;
+if test "$enable_stackguard_randomize" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define ENABLE_STACKGUARD_RANDOMIZE 1
+_ACEOF
+
+fi
+
+# Check whether --enable-add-ons or --disable-add-ons was given.
+if test "${enable_add_ons+set}" = set; then
+ enableval="$enable_add_ons"
+
+else
+ enable_add_ons=yes
+fi;
+
+
+# Check whether --with-tls or --without-tls was given.
+if test "${with_tls+set}" = set; then
+ withval="$with_tls"
+ usetls=$withval
+else
+ usetls=yes
+fi;
+
+
+# Check whether --with-__thread or --without-__thread was given.
+if test "${with___thread+set}" = set; then
+ withval="$with___thread"
+ use__thread=$withval
+else
+ use__thread=yes
+fi;
+
+# Check whether --enable-hidden-plt or --disable-hidden-plt was given.
+if test "${enable_hidden_plt+set}" = set; then
+ enableval="$enable_hidden_plt"
+ hidden=$enableval
+else
+ hidden=yes
+fi;
+if test "x$hidden" = xno; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_HIDDEN 1
+_ACEOF
+
+fi
+
+# Check whether --enable-bind-now or --disable-bind-now was given.
+if test "${enable_bind_now+set}" = set; then
+ enableval="$enable_bind_now"
+ bindnow=$enableval
+else
+ bindnow=no
+fi;
+
+
+# Check whether --enable-static-nss or --disable-static-nss was given.
+if test "${enable_static_nss+set}" = set; then
+ enableval="$enable_static_nss"
+ static_nss=$enableval
+else
+ static_nss=no
+fi;
+if test x"$static_nss" = xyes || test x"$shared" = xno; then
+ static_nss=yes
+ cat >>confdefs.h <<\_ACEOF
+#define DO_STATIC_NSS 1
+_ACEOF
+
+fi
+
+# Check whether --enable-force-install or --disable-force-install was given.
+if test "${enable_force_install+set}" = set; then
+ enableval="$enable_force_install"
+ force_install=$enableval
+else
+ force_install=yes
+fi;
+
+
+# Check whether --enable-kernel or --disable-kernel was given.
+if test "${enable_kernel+set}" = set; then
+ enableval="$enable_kernel"
+ minimum_kernel=$enableval
+fi;
+if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
+ # Better nothing than this.
+ minimum_kernel=""
+else
+ if test "$minimum_kernel" = current; then
+ minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel=
+ fi
+fi
+
+# Check whether --enable-all-warnings or --disable-all-warnings was given.
+if test "${enable_all_warnings+set}" = set; then
+ enableval="$enable_all_warnings"
+ all_warnings=$enableval
+fi;
+
+
+
+
+# Check whether --with-pkgversion or --without-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then
+ withval="$with_pkgversion"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
+echo "$as_me: error: package version not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac
+else
+ PKGVERSION="(EGLIBC) "
+
+fi;
+
+
+
+
+# Check whether --with-bugurl or --without-bugurl was given.
+if test "${with_bugurl+set}" = set; then
+ withval="$with_bugurl"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
+echo "$as_me: error: bug URL not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac
+else
+ BUGURL="http://www.eglibc.org/issues/"
+
+fi;
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PKGVERSION "$PKGVERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
+_ACEOF
+
+
+# Check whether --enable-multi-arch or --disable-multi-arch was given.
+if test "${enable_multi_arch+set}" = set; then
+ enableval="$enable_multi_arch"
+ multi_arch=$enableval
+else
+ multi_arch=no
+fi;
+if test x"$multi_arch" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_MULTIARCH 1
+_ACEOF
+
+ multi_arch_d=/multiarch
+fi
+
+
+# Check whether --enable-experimental-malloc or --disable-experimental-malloc was given.
+if test "${enable_experimental_malloc+set}" = set; then
+ enableval="$enable_experimental_malloc"
+ experimental_malloc=$enableval
+fi;
+
+
+# Check whether --enable-nss-crypt or --disable-nss-crypt was given.
+if test "${enable_nss_crypt+set}" = set; then
+ enableval="$enable_nss_crypt"
+ nss_crypt=$enableval
+else
+ nss_crypt=no
+fi;
+if test x$nss_crypt = xyes; then
+ nss_includes=-I$(nss-config --includedir 2>/dev/null)
+ if test $? -ne 0; then
+ { { echo "$as_me:$LINENO: error: cannot find include directory with nss-config" >&5
+echo "$as_me: error: cannot find include directory with nss-config" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $nss_includes"
+
+cat >conftest.$ac_ext <<_ACEOF
+typedef int PRBool;
+#include <hasht.h>
+#include <nsslowhash.h>
+void f (void) { NSSLOW_Init (); }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_nss_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error:
+cannot find NSS headers with lowlevel hash function interfaces" >&5
+echo "$as_me: error:
+cannot find NSS headers with lowlevel hash function interfaces" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ old_LIBS="$LIBS"
+ LIBS="$LIBS -lfreebl3"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+typedef int PRBool;
+#include <hasht.h>
+#include <nsslowhash.h>
+int
+main ()
+{
+NSSLOW_Init();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_nss_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error:
+cannot link program using lowlevel NSS hash functions" >&5
+echo "$as_me: error:
+cannot link program using lowlevel NSS hash functions" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$old_CFLAGS"
+ LIBS="$old_LIBS"
+else
+ libc_cv_nss_crypt=no
+fi
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+# The way shlib-versions is used to generate soversions.mk uses a
+# fairly simplistic model for name recognition that can't distinguish
+# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
+# tell. This doesn't get used much beyond that, so it's fairly safe.
+case "$host_os" in
+linux*)
+ ;;
+gnu*)
+ host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
+ ;;
+esac
+
+# We keep the original values in `$config_*' and never modify them, so we
+# can write them unchanged into config.make. Everything else uses
+# $machine, $vendor, and $os, and changes them whenever convenient.
+config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
+
+# Don't allow vendor == "unknown"
+test "$config_vendor" = unknown && config_vendor=
+config_os="`echo $config_os | sed 's/^unknown-//'`"
+
+# Some configurations imply other options.
+case "$host_os" in
+# i586-linuxaout is mangled into i586-pc-linux-gnuaout
+linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
+ ;;
+gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
+ # These systems (almost) always use the ELF format.
+ elf=yes
+ ;;
+aix*)
+ # These systems are always xcoff
+ xcoff=yes
+ elf=no
+ ;;
+esac
+
+# The configure fragment of an add-on port can modify these to supplement
+# or override the table in the case statement below. No fragment should
+# ever change the config_* variables, however.
+machine=$config_machine
+vendor=$config_vendor
+os=$config_os
+base_os=''
+
+# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
+# Unify this here.
+if test "$machine" = rs6000; then
+ machine="powerpc"
+fi
+
+# Braindead PowerPC box with absolutely no FPU.
+case "$machine-$host_os" in
+ powerpc*-*soft)
+ with_fp=no
+ ;;
+esac
+
+submachine=
+
+# Check whether --with-cpu or --without-cpu was given.
+if test "${with_cpu+set}" = set; then
+ withval="$with_cpu"
+ case "$withval" in
+ yes|'') { { echo "$as_me:$LINENO: error: --with-cpu requires an argument" >&5
+echo "$as_me: error: --with-cpu requires an argument" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) ;;
+ *) submachine="$withval" ;;
+ esac
+
+fi;
+
+# An add-on can set this when it wants to disable the sanity check below.
+libc_config_ok=no
+
+
+
+subdirs="$subdirs "
+
+
+case "$enable_add_ons" in
+''|no) add_ons= ;;
+yes|'*')
+ add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
+ sed 's@/[^/]*$@@' | sort | uniq`
+ add_ons_automatic=yes
+ ;;
+*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
+ add_ons_automatic=no ;;
+esac
+
+configured_add_ons=
+add_ons_sfx=
+add_ons_pfx=
+if test x"$add_ons" != x; then
+ for f in $add_ons; do
+ # Some sanity checks
+ case "$f" in
+ crypt)
+ { { echo "$as_me:$LINENO: error:
+*** It seems that you're using an old \`crypt' add-on. crypt is now
+*** part of glibc and using the old add-on will not work with this
+*** release. Start again with fresh sources and without the old
+*** \`crypt' add-on." >&5
+echo "$as_me: error:
+*** It seems that you're using an old \`crypt' add-on. crypt is now
+*** part of glibc and using the old add-on will not work with this
+*** release. Start again with fresh sources and without the old
+*** \`crypt' add-on." >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ localedata)
+ { { echo "$as_me:$LINENO: error:
+*** It seems that you're using an old \`localedata' add-on. localedata
+*** is now part of glibc and using the old add-on will not work with
+*** this release. Start again with fresh sources and without the old
+*** \`localedata' add-on." >&5
+echo "$as_me: error:
+*** It seems that you're using an old \`localedata' add-on. localedata
+*** is now part of glibc and using the old add-on will not work with
+*** this release. Start again with fresh sources and without the old
+*** \`localedata' add-on." >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ done
+
+ # Now source each add-on's configure fragment.
+ # The fragments can use $srcdir/$libc_add_on to find themselves,
+ # and test $add_ons_automatic to see if they were explicitly requested.
+ # A fragment can clear (or even change) $libc_add_on to affect
+ # whether it goes into the list to be actually used in the build.
+ use_add_ons=
+ for libc_add_on in $add_ons; do
+ # Test whether such a directory really exists.
+ # It can be absolute, or relative to $srcdir, or relative to the build dir.
+ case "$libc_add_on" in
+ /*)
+ libc_add_on_srcdir=$libc_add_on
+ ;;
+ *)
+ test -d "$srcdir/$libc_add_on" || {
+ if test -d "$libc_add_on"; then
+ libc_add_on="`pwd`/$libc_add_on"
+ else
+ { { echo "$as_me:$LINENO: error: add-on directory \"$libc_add_on\" does not exist" >&5
+echo "$as_me: error: add-on directory \"$libc_add_on\" does not exist" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ }
+ libc_add_on_srcdir=$srcdir/$libc_add_on
+ ;;
+ esac
+
+ libc_add_on_frag=$libc_add_on_srcdir/configure
+ libc_add_on_canonical=
+ if test -r "$libc_add_on_frag"; then
+ { echo "$as_me:$LINENO: running configure fragment for add-on $libc_add_on" >&5
+echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;}
+ libc_add_on_canonical=unknown
+ libc_add_on_subdirs=
+ . "$libc_add_on_frag"
+ test -z "$libc_add_on" || {
+ configured_add_ons="$configured_add_ons $libc_add_on"
+ if test "x$libc_add_on_canonical" = xunknown; then
+ { { echo "$as_me:$LINENO: error: fragment must set \$libc_add_on_canonical" >&5
+echo "$as_me: error: fragment must set \$libc_add_on_canonical" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ for d in $libc_add_on_subdirs; do
+ case "$libc_add_on" in
+ /*) subdir_srcdir="$libc_add_on" ;;
+ *) subdir_srcdir="\$(..)$libc_add_on" ;;
+ esac
+ case "$d" in
+ .)
+ d="${libc_add_on_canonical:-$libc_add_on}"
+ ;;
+ /*)
+ subdir_srcdir="$d"
+ ;;
+ *)
+ subdir_srcdir="$subdir_srcdir/$d"
+ ;;
+ esac
+ d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
+ add_on_subdirs="$add_on_subdirs $d"
+ test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
+$d-srcdir = $subdir_srcdir"
+ done
+ }
+ fi
+ if test -n "$libc_add_on"; then
+ if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
+ then
+ echo "$as_me:$LINENO: checking add-on $libc_add_on for preconfigure fragments" >&5
+echo $ECHO_N "checking add-on $libc_add_on for preconfigure fragments... $ECHO_C" >&6
+ for frag in $frags; do
+ name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
+ echo $ECHO_N "$name $ECHO_C" >&6
+ . "$frag"
+ done
+ echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+ fi
+ use_add_ons="$use_add_ons $libc_add_on"
+ add_ons_pfx="$add_ons_pfx $libc_add_on/"
+ test -z "$libc_add_on_canonical" ||
+ add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
+ fi
+ done
+ # Use echo to strip excess whitespace.
+ add_ons="`echo $use_add_ons`"
+fi
+
+
+
+
+###
+### I put this here to prevent those annoying emails from people who cannot
+### read and try to compile glibc on unsupported platforms. --drepper
+###
+### By using the undocumented --enable-hacker-mode option for configure
+### one can skip this test to make the configuration not fail for unsupported
+### platforms.
+###
+if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
+ case "$machine-$host_os" in
+ *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ ;;
+ *)
+ echo "*** The GNU C library is currently not available for this platform."
+ echo "*** So far nobody cared to port it and if there is no volunteer it"
+ echo "*** might never happen. So, if you have interest to see glibc on"
+ echo "*** this platform visit"
+ echo "*** http://www.gnu.org/software/libc/porting.html"
+ echo "*** and join the group of porters"
+ exit 1
+ ;;
+ esac
+fi
+
+# Expand the configuration machine name into a subdirectory by architecture
+# type and particular chip. If an add-on configure fragment already set
+# base_machine, we don't change it.
+test -n "$base_machine" || case "$machine" in
+a29k | am29000) base_machine=a29k machine=a29k ;;
+c3[012]) base_machine=cx0 machine=cx0/c30 ;;
+c4[04]) base_machine=cx0 machine=cx0/c40 ;;
+i[34567]86) base_machine=i386 machine=i386/$machine ;;
+ia64) base_machine=ia64 machine=ia64 ;;
+m88???) base_machine=m88k machine=m88k/$machine ;;
+m88k) base_machine=m88k machine=m88k/m88100 ;;
+powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
+powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
+s390) base_machine=s390 machine=s390/s390-32 ;;
+s390x) base_machine=s390 machine=s390/s390-64 ;;
+sh3*) base_machine=sh machine=sh/sh3 ;;
+sh4*) base_machine=sh machine=sh/sh4 ;;
+sparc | sparcv[67])
+ base_machine=sparc machine=sparc/sparc32 ;;
+sparcv8 | supersparc | hypersparc)
+ base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
+sparcv8plus | sparcv8plusa | sparcv9)
+ base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
+sparcv8plusb | sparcv9b)
+ base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
+sparcv9v)
+ base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;;
+sparcv9v2)
+ base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v2 ;;
+sparc64)
+ base_machine=sparc machine=sparc/sparc64 ;;
+sparc64b)
+ base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
+sparc64v)
+ base_machine=sparc machine=sparc/sparc64/sparcv9v ;;
+sparc64v2)
+ base_machine=sparc machine=sparc/sparc64/sparcv9v2 ;;
+*) base_machine=$machine ;;
+esac
+
+
+if test "$base_machine" = "i386"; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_REGPARMS 1
+_ACEOF
+
+fi
+
+# Compute the list of sysdep directories for this configuration.
+# This can take a while to compute.
+sysdep_dir=$srcdir/sysdeps
+echo "$as_me:$LINENO: checking sysdep dirs" >&5
+echo $ECHO_N "checking sysdep dirs... $ECHO_C" >&6
+# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
+os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
+
+test "x$base_os" != x || case "$os" in
+gnu*)
+ base_os=mach/hurd ;;
+netbsd* | 386bsd* | freebsd* | bsdi*)
+ base_os=unix/bsd/bsd4.4 ;;
+osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
+ base_os=unix/bsd ;;
+sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
+ base_os=unix/sysv ;;
+irix6*)
+ base_os=unix/sysv/irix6/$os ;;
+solaris[2-9]*)
+ base_os=unix/sysv/sysv4 ;;
+hpux*)
+ base_os=unix/sysv/hpux/$os ;;
+aix4.3*)
+ base_os=unix/sysv/aix/aix4.3 ;;
+none)
+ base_os=standalone ;;
+esac
+
+# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
+tail=$os
+ostry=$os
+while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do
+ ostry="$ostry /$o"
+ tail=$o
+done
+o=`echo $tail | sed 's/[0-9]*$//'`
+if test $o != $tail; then
+ ostry="$ostry /$o"
+fi
+# For linux-gnu, try linux-gnu, then linux.
+o=`echo $tail | sed 's/-.*$//'`
+if test $o != $tail; then
+ ostry="$ostry /$o"
+fi
+
+# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
+base=
+tail=$base_os
+while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
+ set $b
+ base="$base /$1"
+ tail="$2"
+done
+
+# For sparc/sparc32, try sparc/sparc32 and then sparc.
+mach=
+tail=$machine${submachine:+/$submachine}
+while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
+ set $m
+ # Prepend the machine's FPU directory unless --without-fp.
+ if test "$with_fp" = yes; then
+ mach="$mach /$1/fpu"
+ else
+ mach="$mach /$1/nofpu"
+ fi
+ mach="$mach /$1"
+ tail="$2"
+done
+
+
+# Find what sysdep directories exist.
+sysnames_add_ons=
+sysnames=
+for b in $base ''; do
+ for m0 in $mach ''; do
+ for v in /$vendor ''; do
+ test "$v" = / && continue
+ for o in /$ostry ''; do
+ test "$o" = / && continue
+ for m in $multi_arch_d $mach ''; do
+ for d in $add_ons_pfx ''; do
+ for a in $add_ons_sfx ''; do
+ if test -n "$m0$m0sub$b$v$o$m$msub"; then
+ try_srcdir="${srcdir}/"
+ case "$d" in
+ /*) try_srcdir= ;;
+ esac
+ try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
+ test -n "$enable_debug_configure" &&
+ echo "$0 DEBUG: try $try" >&2
+ if test -d "$try_srcdir$try"; then
+ sysnames="$sysnames $try"
+ { test -n "$o" || test -n "$b"; } && os_used=t
+ { test -n "$m" || test -n "$m0"; } && machine_used=t
+ case x${m0:-$m} in
+ x*/$submachine) submachine_used=t ;;
+ esac
+ if test -n "$d"; then
+ case "$sysnames_add_ons" in
+ *" $d "*) ;;
+ *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
+ esac
+ fi
+ fi
+ fi
+ done
+ done
+ done
+ done
+ done
+ done
+done
+
+if test -z "$os_used" && test "$os" != none; then
+ { { echo "$as_me:$LINENO: error: Operating system $os is not supported." >&5
+echo "$as_me: error: Operating system $os is not supported." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "$machine_used" && test "$machine" != none; then
+ { { echo "$as_me:$LINENO: error: The $machine is not supported." >&5
+echo "$as_me: error: The $machine is not supported." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "$submachine_used" && test -n "$submachine"; then
+ { { echo "$as_me:$LINENO: error: The $submachine subspecies of $host_cpu is not supported." >&5
+echo "$as_me: error: The $submachine subspecies of $host_cpu is not supported." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+# We have now validated the configuration.
+
+
+# If using ELF, look for an `elf' subdirectory of each machine directory.
+# We prepend these rather than inserting them whereever the machine appears
+# because things specified by the machine's ELF ABI should override
+# OS-specific things, and should always be the same for any OS on the
+# machine (otherwise what's the point of an ABI?).
+if test "$elf" = yes; then
+ elf_dirs=
+ for d in $add_ons_pfx ''; do
+ for m in $mach; do
+ if test -d $srcdir/${d}sysdeps$m/elf; then
+ elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
+ fi
+ done
+ done
+ sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
+fi
+
+
+# Expand the list of system names into a full list of directories
+# from each element's parent name and Implies file (if present).
+set $sysnames
+names=
+while test $# -gt 0; do
+ name=$1
+ shift
+
+ case " $names " in *" $name "*)
+ # Already in the list.
+ continue
+ esac
+
+ # Report each name as we discover it, so there is no long pause in output.
+ echo $ECHO_N "$name $ECHO_C" >&6
+
+ name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
+
+ case $name in
+ /*) xsrcdir= ;;
+ *) xsrcdir=$srcdir/ ;;
+ esac
+ test -n "$enable_debug_configure" &&
+ echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2
+
+ if test -f $xsrcdir$name/Implies; then
+ # Collect more names from the `Implies' file (removing comments).
+ implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
+ implied=
+ for x in $implied_candidate; do
+ found=no
+ if test -d $xsrcdir$name_base/$x; then
+ implied="$implied $name_base/$x";
+ found=yes
+ fi
+ for d in $add_ons_pfx ''; do
+ try="${d}sysdeps/$x"
+ case $d in
+ /*) try_srcdir= ;;
+ *) try_srcdir=$srcdir/ ;;
+ esac
+ test -n "$enable_debug_configure" &&
+ echo "DEBUG: $name implied $x try($d) {$try_srcdir}$try" >&2
+ if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try;
+ then
+ implied="$implied $try"
+ found=yes
+ case "$sysnames_add_ons" in
+ *" $d "*) ;;
+ *|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
+ esac
+ fi
+ done
+ if test $found = no; then
+ { echo "$as_me:$LINENO: WARNING: $name/Implies specifies nonexistent $x" >&5
+echo "$as_me: WARNING: $name/Implies specifies nonexistent $x" >&2;}
+ fi
+ done
+ else
+ implied=
+ fi
+
+ # Add NAME to the list of names.
+ names="$names $name"
+
+ # Find the parent of NAME, using the empty string if it has none.
+ parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
+
+ # Add the names implied by NAME, and NAME's parent (if it has one), to
+ # the list of names to be processed (the argument list). We prepend the
+ # implied names to the list and append the parent. We want implied
+ # directories to come before further directories inferred from the
+ # configuration components; this ensures that for sysv4, unix/common
+ # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
+ # after sysv4).
+ sysnames="`echo $implied $* $parent`"
+ test -n "$sysnames" && set $sysnames
+done
+
+# Add the default directories.
+default_sysnames=sysdeps/generic
+if test "$elf" = yes; then
+ default_sysnames="sysdeps/generic/elf $default_sysnames"
+fi
+sysnames="$names $default_sysnames"
+
+# The other names were emitted during the scan.
+echo "$as_me:$LINENO: result: $default_sysnames" >&5
+echo "${ECHO_T}$default_sysnames" >&6
+
+# Collect the list of add-ons that supply partial sysdeps trees.
+sysdeps_add_ons=
+for add_on in $add_ons; do
+ case "$add_on" in
+ /*) xsrcdir= ;;
+ *) xsrcdir="$srcdir/" ;;
+ esac
+
+ test -d "$xsrcdir$add_on/sysdeps" || {
+ case "$configured_add_ons " in
+ *" $add_on "*) ;;
+ *|'')
+ { { echo "$as_me:$LINENO: error: add-on $add_on has no configure fragment or sysdeps tree" >&5
+echo "$as_me: error: add-on $add_on has no configure fragment or sysdeps tree" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ continue
+ }
+
+ sysdeps_add_ons="$sysdeps_add_ons $add_on"
+ case "$sysnames_add_ons" in
+ *" $add_on/ "*) ;;
+ *|'')
+ { echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no sysdeps directories" >&5
+echo "$as_me: WARNING: add-on $add_on contributed no sysdeps directories" >&2;}
+ continue ;;
+ esac
+
+ found=no
+ for d in $sysnames; do
+ case "$d" in
+ $add_on/sysdeps/*) ;;
+ *) continue ;;
+ esac
+ (cd "$xsrcdir$d" && for f in *[!~]; do
+ case "$f" in
+ sys|bits)
+ for ff in $f/*.h; do
+ test -d "$ff" || { test -e "$ff" && exit 88; }
+ done
+ ;;
+ *)
+ test -d "$f" || { test -e "$f" && exit 88; }
+ ;;
+ esac
+ done)
+ if test $? -eq 88; then
+ found=yes
+ break
+ fi
+ done
+ if test $found = no; then
+ { echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no useful sysdeps directories" >&5
+echo "$as_me: WARNING: add-on $add_on contributed no useful sysdeps directories" >&2;}
+ fi
+done
+
+
+
+### Locate tools.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
+ # The makefiles need to use a different form to find it in $srcdir.
+ INSTALL='\$(..)./scripts/install-sh -c'
+fi
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+
# Was a --with-binutils option given?
if test -n "$path_binutils"; then
# Make absolute; ensure a single trailing slash.
@@ -5040,7 +5160,6 @@ if test $libc_cv_signed_size_t = yes; then
EOF
fi
-
echo "$as_me:$LINENO: checking for libc-friendly stddef.h" >&5
echo $ECHO_N "checking for libc-friendly stddef.h... $ECHO_C" >&6
if test "${libc_cv_friendly_stddef+set}" = set; then
@@ -7945,22 +8064,22 @@ fi
echo "$as_me:$LINENO: checking whether -fPIC is default" >&5
echo $ECHO_N "checking whether -fPIC is default... $ECHO_C" >&6
-if test "${pic_default+set}" = set; then
+if test "${libc_cv_pic_default+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- pic_default=yes
+ libc_cv_pic_default=yes
cat > conftest.c <<EOF
#if defined __PIC__ || defined __pic__ || defined PIC || defined pic
# error PIC is default.
#endif
EOF
if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
- pic_default=no
+ libc_cv_pic_default=no
fi
rm -f conftest.*
fi
-echo "$as_me:$LINENO: result: $pic_default" >&5
-echo "${ECHO_T}$pic_default" >&6
+echo "$as_me:$LINENO: result: $libc_cv_pic_default" >&5
+echo "${ECHO_T}$libc_cv_pic_default" >&6
@@ -8613,6 +8732,18 @@ s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@cross_compiling@,$cross_compiling,;t t
+s,@CPP@,$CPP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@with_fp@,$with_fp,;t t
s,@with_cvs@,$with_cvs,;t t
s,@enable_check_abi@,$enable_check_abi,;t t
@@ -8625,6 +8756,7 @@ s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
s,@multi_arch@,$multi_arch,;t t
s,@experimental_malloc@,$experimental_malloc,;t t
+s,@libc_cv_nss_crypt@,$libc_cv_nss_crypt,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
@@ -8644,18 +8776,6 @@ s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@BUILD_CC@,$BUILD_CC,;t t
-s,@cross_compiling@,$cross_compiling,;t t
-s,@CPP@,$CPP,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@AR@,$AR,;t t
s,@NM@,$NM,;t t
s,@OBJDUMP@,$OBJDUMP,;t t
@@ -8721,7 +8841,7 @@ s,@elf@,$elf,;t t
s,@xcoff@,$xcoff,;t t
s,@static@,$static,;t t
s,@shared@,$shared,;t t
-s,@pic_default@,$pic_default,;t t
+s,@libc_cv_pic_default@,$libc_cv_pic_default,;t t
s,@profile@,$profile,;t t
s,@omitfp@,$omitfp,;t t
s,@bounded@,$bounded,;t t
diff --git a/libc/configure.in b/libc/configure.in
index f3c512daa..b0ca65e9a 100644
--- a/libc/configure.in
+++ b/libc/configure.in
@@ -6,6 +6,15 @@ AC_CONFIG_SRCDIR([include/features.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([scripts])
+AC_PROG_CC
+if test $host != $build; then
+ AC_CHECK_PROGS(BUILD_CC, gcc cc)
+fi
+AC_SUBST(cross_compiling)
+AC_PROG_CPP
+# We need the C++ compiler only for testing.
+AC_PROG_CXX
+
if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
AC_MSG_ERROR([you must configure in a separate build directory])
fi
@@ -277,6 +286,41 @@ AC_ARG_ENABLE([experimental-malloc],
[])
AC_SUBST(experimental_malloc)
+AC_ARG_ENABLE([nss-crypt],
+ AC_HELP_STRING([--enable-nss-crypt],
+ [enable libcrypt to use nss]),
+ [nss_crypt=$enableval],
+ [nss_crypt=no])
+if test x$nss_crypt = xyes; then
+ nss_includes=-I$(nss-config --includedir 2>/dev/null)
+ if test $? -ne 0; then
+ AC_MSG_ERROR([cannot find include directory with nss-config])
+ fi
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $nss_includes"
+ AC_COMPILE_IFELSE([typedef int PRBool;
+#include <hasht.h>
+#include <nsslowhash.h>
+void f (void) { NSSLOW_Init (); }],
+ libc_cv_nss_crypt=yes,
+ AC_MSG_ERROR([
+cannot find NSS headers with lowlevel hash function interfaces]))
+ old_LIBS="$LIBS"
+ LIBS="$LIBS -lfreebl3"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([typedef int PRBool;
+#include <hasht.h>
+#include <nsslowhash.h>],
+ [NSSLOW_Init();])],
+ libc_cv_nss_crypt=yes,
+ AC_MSG_ERROR([
+cannot link program using lowlevel NSS hash functions]))
+ CFLAGS="$old_CFLAGS"
+ LIBS="$old_LIBS"
+else
+ libc_cv_nss_crypt=no
+fi
+AC_SUBST(libc_cv_nss_crypt)
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a
@@ -852,14 +896,6 @@ if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
fi
AC_PROG_LN_S
-AC_PROG_CC
-if test $host != $build; then
- AC_CHECK_PROGS(BUILD_CC, gcc cc)
-fi
-AC_SUBST(cross_compiling)
-AC_PROG_CPP
-# We need the C++ compiler only for testing.
-AC_PROG_CXX
LIBC_PROG_BINUTILS
AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
@@ -2240,18 +2276,18 @@ if test $shared = default; then
shared=$elf
fi
-AC_CACHE_CHECK([whether -fPIC is default], pic_default,
-[pic_default=yes
+AC_CACHE_CHECK([whether -fPIC is default], libc_cv_pic_default,
+[libc_cv_pic_default=yes
cat > conftest.c <<EOF
#if defined __PIC__ || defined __pic__ || defined PIC || defined pic
# error PIC is default.
#endif
EOF
if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
- pic_default=no
+ libc_cv_pic_default=no
fi
rm -f conftest.*])
-AC_SUBST(pic_default)
+AC_SUBST(libc_cv_pic_default)
AC_SUBST(profile)
AC_SUBST(omitfp)
diff --git a/libc/crypt/Makefile b/libc/crypt/Makefile
index 28f82193b..b9c879747 100644
--- a/libc/crypt/Makefile
+++ b/libc/crypt/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 2000, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -26,10 +26,10 @@ headers := crypt.h
extra-libs := libcrypt
extra-libs-others := $(extra-libs)
-libcrypt-routines := crypt-entry md5-crypt md5 sha256-crypt sha256 \
- sha512-crypt sha512 crypt crypt_util
+libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
+ crypt_util
-tests := cert md5test md5c-test sha256test sha256c-test sha512test sha512c-test
+tests := cert md5c-test sha256c-test sha512c-test
distribute := ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \
Banner md5.h sha256.h sha512.h
@@ -40,9 +40,20 @@ ifeq ($(crypt-in-libc),yes)
routines += $(libcrypt-routines)
endif
+ifeq ($(nss-crypt),yes)
+CPPFLAGS-sha256-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+CPPFLAGS-sha512-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+CPPFLAGS-md5-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+LDLIBS-crypt.so = -lfreebl3
+else
+libcrypt-routines += md5 sha256 sha512
+
+tests += md5test sha256test sha512test
+
$(objpfx)md5test: $(objpfx)md5.o
$(objpfx)sha256test: $(objpfx)sha256.o
$(objpfx)sha512test: $(objpfx)sha512.o
+endif
include ../Rules
diff --git a/libc/crypt/md5-crypt.c b/libc/crypt/md5-crypt.c
index 8a000f0ac..403cb2be5 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
+ Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -29,6 +29,52 @@
#include "md5.h"
+#ifdef USE_NSS
+typedef int PRBool;
+# include <hasht.h>
+# include <nsslowhash.h>
+
+# define md5_init_ctx(ctxp, nss_ctxp) \
+ do \
+ { \
+ if (((nss_ctxp = NSSLOWHASH_NewContext (nss_ictx, HASH_AlgMD5)) \
+ == NULL)) \
+ { \
+ if (nss_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_ctx); \
+ if (nss_alt_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_alt_ctx); \
+ return NULL; \
+ } \
+ NSSLOWHASH_Begin (nss_ctxp); \
+ } \
+ while (0)
+
+# define md5_process_bytes(buf, len, ctxp, nss_ctxp) \
+ NSSLOWHASH_Update (nss_ctxp, (const unsigned char *) buf, len)
+
+# define md5_finish_ctx(ctxp, nss_ctxp, result) \
+ do \
+ { \
+ unsigned int ret; \
+ NSSLOWHASH_End (nss_ctxp, result, &ret, sizeof (result)); \
+ assert (ret == sizeof (result)); \
+ NSSLOWHASH_Destroy (nss_ctxp); \
+ nss_ctxp = NULL; \
+ } \
+ while (0)
+#else
+# define md5_init_ctx(ctxp, nss_ctxp) \
+ __md5_init_ctx (ctxp)
+
+# define md5_process_bytes(buf, len, ctxp, nss_ctxp) \
+ __md5_process_bytes(buf, len, ctxp)
+
+# define md5_finish_ctx(ctxp, nss_ctxp, result) \
+ __md5_finish_ctx (ctxp, result)
+#endif
+
+
/* Define our magic string to mark salt for MD5 "encryption"
replacement. This is meant to be the same as for other MD5 based
encryption implementations. */
@@ -56,8 +102,6 @@ __md5_crypt_r (key, salt, buffer, buflen)
{
unsigned char alt_result[16]
__attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
- struct md5_ctx ctx;
- struct md5_ctx alt_ctx;
size_t salt_len;
size_t key_len;
size_t cnt;
@@ -94,43 +138,56 @@ __md5_crypt_r (key, salt, buffer, buflen)
assert ((salt - (char *) 0) % __alignof__ (md5_uint32) == 0);
}
+#ifdef USE_NSS
+ /* Initialize libfreebl3. */
+ NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
+ if (nss_ictx == NULL)
+ return NULL;
+ NSSLOWHASHContext *nss_ctx = NULL;
+ NSSLOWHASHContext *nss_alt_ctx = NULL;
+#else
+ struct md5_ctx ctx;
+ struct md5_ctx alt_ctx;
+#endif
+
/* Prepare for the real work. */
- __md5_init_ctx (&ctx);
+ md5_init_ctx (&ctx, nss_ctx);
/* Add the key string. */
- __md5_process_bytes (key, key_len, &ctx);
+ md5_process_bytes (key, key_len, &ctx, nss_ctx);
/* Because the SALT argument need not always have the salt prefix we
add it separately. */
- __md5_process_bytes (md5_salt_prefix, sizeof (md5_salt_prefix) - 1, &ctx);
+ md5_process_bytes (md5_salt_prefix, sizeof (md5_salt_prefix) - 1,
+ &ctx, nss_ctx);
/* The last part is the salt string. This must be at most 8
characters and it ends at the first `$' character (for
compatibility with existing implementations). */
- __md5_process_bytes (salt, salt_len, &ctx);
+ md5_process_bytes (salt, salt_len, &ctx, nss_ctx);
/* Compute alternate MD5 sum with input KEY, SALT, and KEY. The
final result will be added to the first context. */
- __md5_init_ctx (&alt_ctx);
+ md5_init_ctx (&alt_ctx, nss_alt_ctx);
/* Add key. */
- __md5_process_bytes (key, key_len, &alt_ctx);
+ md5_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Add salt. */
- __md5_process_bytes (salt, salt_len, &alt_ctx);
+ md5_process_bytes (salt, salt_len, &alt_ctx, nss_alt_ctx);
/* Add key again. */
- __md5_process_bytes (key, key_len, &alt_ctx);
+ md5_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Now get result of this (16 bytes) and add it to the other
context. */
- __md5_finish_ctx (&alt_ctx, alt_result);
+ md5_finish_ctx (&alt_ctx, nss_alt_ctx, alt_result);
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 16; cnt -= 16)
- __md5_process_bytes (alt_result, 16, &ctx);
- __md5_process_bytes (alt_result, cnt, &ctx);
+ md5_process_bytes (alt_result, 16, &ctx, nss_ctx);
+ md5_process_bytes (alt_result, cnt, &ctx, nss_ctx);
/* For the following code we need a NUL byte. */
*alt_result = '\0';
@@ -140,11 +197,12 @@ __md5_crypt_r (key, salt, buffer, buflen)
bit the first character of the key. This does not seem to be
what was intended but we have to follow this to be compatible. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
- __md5_process_bytes ((cnt & 1) != 0 ? (const char *) alt_result : key, 1,
- &ctx);
+ md5_process_bytes ((cnt & 1) != 0
+ ? (const void *) alt_result : (const void *) key, 1,
+ &ctx, nss_ctx);
/* Create intermediate result. */
- __md5_finish_ctx (&ctx, alt_result);
+ md5_finish_ctx (&ctx, nss_ctx, alt_result);
/* Now comes another weirdness. In fear of password crackers here
comes a quite long loop which just processes the output of the
@@ -152,32 +210,37 @@ __md5_crypt_r (key, salt, buffer, buflen)
for (cnt = 0; cnt < 1000; ++cnt)
{
/* New context. */
- __md5_init_ctx (&ctx);
+ md5_init_ctx (&ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __md5_process_bytes (key, key_len, &ctx);
+ md5_process_bytes (key, key_len, &ctx, nss_ctx);
else
- __md5_process_bytes (alt_result, 16, &ctx);
+ md5_process_bytes (alt_result, 16, &ctx, nss_ctx);
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
- __md5_process_bytes (salt, salt_len, &ctx);
+ md5_process_bytes (salt, salt_len, &ctx, nss_ctx);
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
- __md5_process_bytes (key, key_len, &ctx);
+ md5_process_bytes (key, key_len, &ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __md5_process_bytes (alt_result, 16, &ctx);
+ md5_process_bytes (alt_result, 16, &ctx, nss_ctx);
else
- __md5_process_bytes (key, key_len, &ctx);
+ md5_process_bytes (key, key_len, &ctx, nss_ctx);
/* Create intermediate result. */
- __md5_finish_ctx (&ctx, alt_result);
+ md5_finish_ctx (&ctx, nss_ctx, alt_result);
}
+#ifdef USE_NSS
+ /* Free libfreebl3 resources. */
+ NSSLOW_Shutdown (nss_ictx);
+#endif
+
/* Now we can construct the result string. It consists of three
parts. */
cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen));
@@ -192,18 +255,17 @@ __md5_crypt_r (key, salt, buffer, buflen)
--buflen;
}
-#define b64_from_24bit(B2, B1, B0, N) \
- do { \
- unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
- int n = (N); \
- while (n-- > 0 && buflen > 0) \
- { \
- *cp++ = b64t[w & 0x3f]; \
- --buflen; \
- w >>= 6; \
- } \
- } while (0)
-
+ void b64_from_24bit (unsigned int b2, unsigned int b1, unsigned int b0,
+ int n)
+ {
+ unsigned int w = (b2 << 16) | (b1 << 8) | b0;
+ while (n-- > 0 && buflen > 0)
+ {
+ *cp++ = b64t[w & 0x3f];
+ --buflen;
+ w >>= 6;
+ }
+ }
b64_from_24bit (alt_result[0], alt_result[6], alt_result[12], 4);
b64_from_24bit (alt_result[1], alt_result[7], alt_result[13], 4);
@@ -223,10 +285,12 @@ __md5_crypt_r (key, salt, buffer, buflen)
attaching to processes or reading core dumps cannot get any
information. We do it in this way to clear correct_words[]
inside the MD5 implementation as well. */
+#ifndef USE_NSS
__md5_init_ctx (&ctx);
__md5_finish_ctx (&ctx, alt_result);
memset (&ctx, '\0', sizeof (ctx));
memset (&alt_ctx, '\0', sizeof (alt_ctx));
+#endif
if (copied_key != NULL)
memset (copied_key, '\0', key_len);
if (copied_salt != NULL)
diff --git a/libc/crypt/sha256-crypt.c b/libc/crypt/sha256-crypt.c
index dbd29e0ef..0131c803c 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 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2007.
@@ -28,6 +28,52 @@
#include "sha256.h"
+#ifdef USE_NSS
+typedef int PRBool;
+# include <hasht.h>
+# include <nsslowhash.h>
+
+# define sha256_init_ctx(ctxp, nss_ctxp) \
+ do \
+ { \
+ if (((nss_ctxp = NSSLOWHASH_NewContext (nss_ictx, HASH_AlgSHA256)) \
+ == NULL)) \
+ { \
+ if (nss_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_ctx); \
+ if (nss_alt_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_alt_ctx); \
+ return NULL; \
+ } \
+ NSSLOWHASH_Begin (nss_ctxp); \
+ } \
+ while (0)
+
+# define sha256_process_bytes(buf, len, ctxp, nss_ctxp) \
+ NSSLOWHASH_Update (nss_ctxp, (const unsigned char *) buf, len)
+
+# define sha256_finish_ctx(ctxp, nss_ctxp, result) \
+ do \
+ { \
+ unsigned int ret; \
+ NSSLOWHASH_End (nss_ctxp, result, &ret, sizeof (result)); \
+ assert (ret == sizeof (result)); \
+ NSSLOWHASH_Destroy (nss_ctxp); \
+ nss_ctxp = NULL; \
+ } \
+ while (0)
+#else
+# define sha256_init_ctx(ctxp, nss_ctxp) \
+ __sha256_init_ctx (ctxp)
+
+# define sha256_process_bytes(buf, len, ctxp, nss_ctxp) \
+ __sha256_process_bytes(buf, len, ctxp)
+
+# define sha256_finish_ctx(ctxp, nss_ctxp, result) \
+ __sha256_finish_ctx (ctxp, result)
+#endif
+
+
/* Define our magic string to mark salt for SHA256 "encryption"
replacement. */
static const char sha256_salt_prefix[] = "$5$";
@@ -66,8 +112,6 @@ __sha256_crypt_r (key, salt, buffer, buflen)
__attribute__ ((__aligned__ (__alignof__ (uint32_t))));
unsigned char temp_result[32]
__attribute__ ((__aligned__ (__alignof__ (uint32_t))));
- struct sha256_ctx ctx;
- struct sha256_ctx alt_ctx;
size_t salt_len;
size_t key_len;
size_t cnt;
@@ -123,59 +167,71 @@ __sha256_crypt_r (key, salt, buffer, buflen)
assert ((salt - (char *) 0) % __alignof__ (uint32_t) == 0);
}
+#ifdef USE_NSS
+ /* Initialize libfreebl3. */
+ NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
+ if (nss_ictx == NULL)
+ return NULL;
+ NSSLOWHASHContext *nss_ctx = NULL;
+ NSSLOWHASHContext *nss_alt_ctx = NULL;
+#else
+ struct sha256_ctx ctx;
+ struct sha256_ctx alt_ctx;
+#endif
+
/* Prepare for the real work. */
- __sha256_init_ctx (&ctx);
+ sha256_init_ctx (&ctx, nss_ctx);
/* Add the key string. */
- __sha256_process_bytes (key, key_len, &ctx);
+ sha256_process_bytes (key, key_len, &ctx, nss_ctx);
/* The last part is the salt string. This must be at most 16
characters and it ends at the first `$' character. */
- __sha256_process_bytes (salt, salt_len, &ctx);
+ sha256_process_bytes (salt, salt_len, &ctx, nss_ctx);
/* Compute alternate SHA256 sum with input KEY, SALT, and KEY. The
final result will be added to the first context. */
- __sha256_init_ctx (&alt_ctx);
+ sha256_init_ctx (&alt_ctx, nss_alt_ctx);
/* Add key. */
- __sha256_process_bytes (key, key_len, &alt_ctx);
+ sha256_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Add salt. */
- __sha256_process_bytes (salt, salt_len, &alt_ctx);
+ sha256_process_bytes (salt, salt_len, &alt_ctx, nss_alt_ctx);
/* Add key again. */
- __sha256_process_bytes (key, key_len, &alt_ctx);
+ sha256_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Now get result of this (32 bytes) and add it to the other
context. */
- __sha256_finish_ctx (&alt_ctx, alt_result);
+ sha256_finish_ctx (&alt_ctx, nss_alt_ctx, alt_result);
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 32; cnt -= 32)
- __sha256_process_bytes (alt_result, 32, &ctx);
- __sha256_process_bytes (alt_result, cnt, &ctx);
+ sha256_process_bytes (alt_result, 32, &ctx, nss_ctx);
+ sha256_process_bytes (alt_result, cnt, &ctx, nss_ctx);
/* Take the binary representation of the length of the key and for every
1 add the alternate sum, for every 0 the key. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
if ((cnt & 1) != 0)
- __sha256_process_bytes (alt_result, 32, &ctx);
+ sha256_process_bytes (alt_result, 32, &ctx, nss_ctx);
else
- __sha256_process_bytes (key, key_len, &ctx);
+ sha256_process_bytes (key, key_len, &ctx, nss_ctx);
/* Create intermediate result. */
- __sha256_finish_ctx (&ctx, alt_result);
+ sha256_finish_ctx (&ctx, nss_ctx, alt_result);
/* Start computation of P byte sequence. */
- __sha256_init_ctx (&alt_ctx);
+ sha256_init_ctx (&alt_ctx, nss_alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < key_len; ++cnt)
- __sha256_process_bytes (key, key_len, &alt_ctx);
+ sha256_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Finish the digest. */
- __sha256_finish_ctx (&alt_ctx, temp_result);
+ sha256_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence P. */
cp = p_bytes = alloca (key_len);
@@ -184,14 +240,14 @@ __sha256_crypt_r (key, salt, buffer, buflen)
memcpy (cp, temp_result, cnt);
/* Start computation of S byte sequence. */
- __sha256_init_ctx (&alt_ctx);
+ sha256_init_ctx (&alt_ctx, nss_alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
- __sha256_process_bytes (salt, salt_len, &alt_ctx);
+ sha256_process_bytes (salt, salt_len, &alt_ctx, nss_alt_ctx);
/* Finish the digest. */
- __sha256_finish_ctx (&alt_ctx, temp_result);
+ sha256_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence S. */
cp = s_bytes = alloca (salt_len);
@@ -204,32 +260,37 @@ __sha256_crypt_r (key, salt, buffer, buflen)
for (cnt = 0; cnt < rounds; ++cnt)
{
/* New context. */
- __sha256_init_ctx (&ctx);
+ sha256_init_ctx (&ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __sha256_process_bytes (p_bytes, key_len, &ctx);
+ sha256_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
else
- __sha256_process_bytes (alt_result, 32, &ctx);
+ sha256_process_bytes (alt_result, 32, &ctx, nss_ctx);
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
- __sha256_process_bytes (s_bytes, salt_len, &ctx);
+ sha256_process_bytes (s_bytes, salt_len, &ctx, nss_ctx);
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
- __sha256_process_bytes (p_bytes, key_len, &ctx);
+ sha256_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __sha256_process_bytes (alt_result, 32, &ctx);
+ sha256_process_bytes (alt_result, 32, &ctx, nss_ctx);
else
- __sha256_process_bytes (p_bytes, key_len, &ctx);
+ sha256_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
/* Create intermediate result. */
- __sha256_finish_ctx (&ctx, alt_result);
+ sha256_finish_ctx (&ctx, nss_ctx, alt_result);
}
+#ifdef USE_NSS
+ /* Free libfreebl3 resources. */
+ NSSLOW_Shutdown (nss_ictx);
+#endif
+
/* Now we can construct the result string. It consists of three
parts. */
cp = __stpncpy (buffer, sha256_salt_prefix, MAX (0, buflen));
@@ -252,17 +313,17 @@ __sha256_crypt_r (key, salt, buffer, buflen)
--buflen;
}
-#define b64_from_24bit(B2, B1, B0, N) \
- do { \
- unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
- int n = (N); \
- while (n-- > 0 && buflen > 0) \
- { \
- *cp++ = b64t[w & 0x3f]; \
- --buflen; \
- w >>= 6; \
- } \
- } while (0)
+ void b64_from_24bit (unsigned int b2, unsigned int b1, unsigned int b0,
+ int n)
+ {
+ unsigned int w = (b2 << 16) | (b1 << 8) | b0;
+ while (n-- > 0 && buflen > 0)
+ {
+ *cp++ = b64t[w & 0x3f];
+ --buflen;
+ w >>= 6;
+ }
+ }
b64_from_24bit (alt_result[0], alt_result[10], alt_result[20], 4);
b64_from_24bit (alt_result[21], alt_result[1], alt_result[11], 4);
@@ -287,13 +348,15 @@ __sha256_crypt_r (key, salt, buffer, buflen)
attaching to processes or reading core dumps cannot get any
information. We do it in this way to clear correct_words[]
inside the SHA256 implementation as well. */
+#ifndef USE_NSS
__sha256_init_ctx (&ctx);
__sha256_finish_ctx (&ctx, alt_result);
+ memset (&ctx, '\0', sizeof (ctx));
+ memset (&alt_ctx, '\0', sizeof (alt_ctx));
+#endif
memset (temp_result, '\0', sizeof (temp_result));
memset (p_bytes, '\0', key_len);
memset (s_bytes, '\0', salt_len);
- memset (&ctx, '\0', sizeof (ctx));
- memset (&alt_ctx, '\0', sizeof (alt_ctx));
if (copied_key != NULL)
memset (copied_key, '\0', key_len);
if (copied_salt != NULL)
diff --git a/libc/crypt/sha512-crypt.c b/libc/crypt/sha512-crypt.c
index ea96e525f..523659e0c 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 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2007.
@@ -28,6 +28,52 @@
#include "sha512.h"
+#ifdef USE_NSS
+typedef int PRBool;
+# include <hasht.h>
+# include <nsslowhash.h>
+
+# define sha512_init_ctx(ctxp, nss_ctxp) \
+ do \
+ { \
+ if (((nss_ctxp = NSSLOWHASH_NewContext (nss_ictx, HASH_AlgSHA512)) \
+ == NULL)) \
+ { \
+ if (nss_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_ctx); \
+ if (nss_alt_ctx != NULL) \
+ NSSLOWHASH_Destroy (nss_alt_ctx); \
+ return NULL; \
+ } \
+ NSSLOWHASH_Begin (nss_ctxp); \
+ } \
+ while (0)
+
+# define sha512_process_bytes(buf, len, ctxp, nss_ctxp) \
+ NSSLOWHASH_Update (nss_ctxp, (const unsigned char *) buf, len)
+
+# define sha512_finish_ctx(ctxp, nss_ctxp, result) \
+ do \
+ { \
+ unsigned int ret; \
+ NSSLOWHASH_End (nss_ctxp, result, &ret, sizeof (result)); \
+ assert (ret == sizeof (result)); \
+ NSSLOWHASH_Destroy (nss_ctxp); \
+ nss_ctxp = NULL; \
+ } \
+ while (0)
+#else
+# define sha512_init_ctx(ctxp, nss_ctxp) \
+ __sha512_init_ctx (ctxp)
+
+# define sha512_process_bytes(buf, len, ctxp, nss_ctxp) \
+ __sha512_process_bytes(buf, len, ctxp)
+
+# define sha512_finish_ctx(ctxp, nss_ctxp, result) \
+ __sha512_finish_ctx (ctxp, result)
+#endif
+
+
/* Define our magic string to mark salt for SHA512 "encryption"
replacement. */
static const char sha512_salt_prefix[] = "$6$";
@@ -66,8 +112,6 @@ __sha512_crypt_r (key, salt, buffer, buflen)
__attribute__ ((__aligned__ (__alignof__ (uint64_t))));
unsigned char temp_result[64]
__attribute__ ((__aligned__ (__alignof__ (uint64_t))));
- struct sha512_ctx ctx;
- struct sha512_ctx alt_ctx;
size_t salt_len;
size_t key_len;
size_t cnt;
@@ -123,59 +167,71 @@ __sha512_crypt_r (key, salt, buffer, buflen)
assert ((salt - (char *) 0) % __alignof__ (uint64_t) == 0);
}
+#ifdef USE_NSS
+ /* Initialize libfreebl3. */
+ NSSLOWInitContext *nss_ictx = NSSLOW_Init ();
+ if (nss_ictx == NULL)
+ return NULL;
+ NSSLOWHASHContext *nss_ctx = NULL;
+ NSSLOWHASHContext *nss_alt_ctx = NULL;
+#else
+ struct sha512_ctx ctx;
+ struct sha512_ctx alt_ctx;
+#endif
+
/* Prepare for the real work. */
- __sha512_init_ctx (&ctx);
+ sha512_init_ctx (&ctx, nss_ctx);
/* Add the key string. */
- __sha512_process_bytes (key, key_len, &ctx);
+ sha512_process_bytes (key, key_len, &ctx, nss_ctx);
/* The last part is the salt string. This must be at most 16
characters and it ends at the first `$' character. */
- __sha512_process_bytes (salt, salt_len, &ctx);
+ sha512_process_bytes (salt, salt_len, &ctx, nss_ctx);
/* Compute alternate SHA512 sum with input KEY, SALT, and KEY. The
final result will be added to the first context. */
- __sha512_init_ctx (&alt_ctx);
+ sha512_init_ctx (&alt_ctx, nss_alt_ctx);
/* Add key. */
- __sha512_process_bytes (key, key_len, &alt_ctx);
+ sha512_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Add salt. */
- __sha512_process_bytes (salt, salt_len, &alt_ctx);
+ sha512_process_bytes (salt, salt_len, &alt_ctx, nss_alt_ctx);
/* Add key again. */
- __sha512_process_bytes (key, key_len, &alt_ctx);
+ sha512_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Now get result of this (64 bytes) and add it to the other
context. */
- __sha512_finish_ctx (&alt_ctx, alt_result);
+ sha512_finish_ctx (&alt_ctx, nss_alt_ctx, alt_result);
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 64; cnt -= 64)
- __sha512_process_bytes (alt_result, 64, &ctx);
- __sha512_process_bytes (alt_result, cnt, &ctx);
+ sha512_process_bytes (alt_result, 64, &ctx, nss_ctx);
+ sha512_process_bytes (alt_result, cnt, &ctx, nss_ctx);
/* Take the binary representation of the length of the key and for every
1 add the alternate sum, for every 0 the key. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
if ((cnt & 1) != 0)
- __sha512_process_bytes (alt_result, 64, &ctx);
+ sha512_process_bytes (alt_result, 64, &ctx, nss_ctx);
else
- __sha512_process_bytes (key, key_len, &ctx);
+ sha512_process_bytes (key, key_len, &ctx, nss_ctx);
/* Create intermediate result. */
- __sha512_finish_ctx (&ctx, alt_result);
+ sha512_finish_ctx (&ctx, nss_ctx, alt_result);
/* Start computation of P byte sequence. */
- __sha512_init_ctx (&alt_ctx);
+ sha512_init_ctx (&alt_ctx, nss_alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < key_len; ++cnt)
- __sha512_process_bytes (key, key_len, &alt_ctx);
+ sha512_process_bytes (key, key_len, &alt_ctx, nss_alt_ctx);
/* Finish the digest. */
- __sha512_finish_ctx (&alt_ctx, temp_result);
+ sha512_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence P. */
cp = p_bytes = alloca (key_len);
@@ -184,14 +240,14 @@ __sha512_crypt_r (key, salt, buffer, buflen)
memcpy (cp, temp_result, cnt);
/* Start computation of S byte sequence. */
- __sha512_init_ctx (&alt_ctx);
+ sha512_init_ctx (&alt_ctx, nss_alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
- __sha512_process_bytes (salt, salt_len, &alt_ctx);
+ sha512_process_bytes (salt, salt_len, &alt_ctx, nss_alt_ctx);
/* Finish the digest. */
- __sha512_finish_ctx (&alt_ctx, temp_result);
+ sha512_finish_ctx (&alt_ctx, nss_alt_ctx, temp_result);
/* Create byte sequence S. */
cp = s_bytes = alloca (salt_len);
@@ -204,32 +260,37 @@ __sha512_crypt_r (key, salt, buffer, buflen)
for (cnt = 0; cnt < rounds; ++cnt)
{
/* New context. */
- __sha512_init_ctx (&ctx);
+ sha512_init_ctx (&ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __sha512_process_bytes (p_bytes, key_len, &ctx);
+ sha512_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
else
- __sha512_process_bytes (alt_result, 64, &ctx);
+ sha512_process_bytes (alt_result, 64, &ctx, nss_ctx);
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
- __sha512_process_bytes (s_bytes, salt_len, &ctx);
+ sha512_process_bytes (s_bytes, salt_len, &ctx, nss_ctx);
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
- __sha512_process_bytes (p_bytes, key_len, &ctx);
+ sha512_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- __sha512_process_bytes (alt_result, 64, &ctx);
+ sha512_process_bytes (alt_result, 64, &ctx, nss_ctx);
else
- __sha512_process_bytes (p_bytes, key_len, &ctx);
+ sha512_process_bytes (p_bytes, key_len, &ctx, nss_ctx);
/* Create intermediate result. */
- __sha512_finish_ctx (&ctx, alt_result);
+ sha512_finish_ctx (&ctx, nss_ctx, alt_result);
}
+#ifdef USE_NSS
+ /* Free libfreebl3 resources. */
+ NSSLOW_Shutdown (nss_ictx);
+#endif
+
/* Now we can construct the result string. It consists of three
parts. */
cp = __stpncpy (buffer, sha512_salt_prefix, MAX (0, buflen));
@@ -252,17 +313,17 @@ __sha512_crypt_r (key, salt, buffer, buflen)
--buflen;
}
-#define b64_from_24bit(B2, B1, B0, N) \
- do { \
- unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
- int n = (N); \
- while (n-- > 0 && buflen > 0) \
- { \
- *cp++ = b64t[w & 0x3f]; \
- --buflen; \
- w >>= 6; \
- } \
- } while (0)
+ void b64_from_24bit (unsigned int b2, unsigned int b1, unsigned int b0,
+ int n)
+ {
+ unsigned int w = (b2 << 16) | (b1 << 8) | b0;
+ while (n-- > 0 && buflen > 0)
+ {
+ *cp++ = b64t[w & 0x3f];
+ --buflen;
+ w >>= 6;
+ }
+ }
b64_from_24bit (alt_result[0], alt_result[21], alt_result[42], 4);
b64_from_24bit (alt_result[22], alt_result[43], alt_result[1], 4);
@@ -299,13 +360,15 @@ __sha512_crypt_r (key, salt, buffer, buflen)
attaching to processes or reading core dumps cannot get any
information. We do it in this way to clear correct_words[]
inside the SHA512 implementation as well. */
+#ifndef USE_NSS
__sha512_init_ctx (&ctx);
__sha512_finish_ctx (&ctx, alt_result);
+ memset (&ctx, '\0', sizeof (ctx));
+ memset (&alt_ctx, '\0', sizeof (alt_ctx));
+#endif
memset (temp_result, '\0', sizeof (temp_result));
memset (p_bytes, '\0', key_len);
memset (s_bytes, '\0', salt_len);
- memset (&ctx, '\0', sizeof (ctx));
- memset (&alt_ctx, '\0', sizeof (alt_ctx));
if (copied_key != NULL)
memset (copied_key, '\0', key_len);
if (copied_salt != NULL)
diff --git a/libc/elf/dl-addr.c b/libc/elf/dl-addr.c
index 17745b55b..2b53a5ed0 100644
--- a/libc/elf/dl-addr.c
+++ b/libc/elf/dl-addr.c
@@ -1,5 +1,5 @@
/* Locate the shared object symbol nearest a given address.
- Copyright (C) 1996-2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -132,7 +132,7 @@ _dl_addr (const void *address, Dl_info *info,
__rtld_lock_lock_recursive (GL(dl_load_lock));
/* Find the highest-addressed object that ADDRESS is not below. */
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l; l = l->l_next)
if (addr >= l->l_map_start && addr < l->l_map_end
&& (l->l_contiguous || _dl_addr_inside_object (l, addr)))
diff --git a/libc/elf/dl-caller.c b/libc/elf/dl-caller.c
index b0c1264d0..416d4127d 100644
--- a/libc/elf/dl-caller.c
+++ b/libc/elf/dl-caller.c
@@ -1,5 +1,5 @@
/* Check whether caller comes from the right place.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ _dl_check_caller (const void *caller, enum allowmask mask)
#endif
static const char expected4[] = LD_SO;
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL;
l = l->l_next)
if (caller >= (const void *) l->l_map_start
diff --git a/libc/elf/dl-close.c b/libc/elf/dl-close.c
index fb96e0d01..865adce40 100644
--- a/libc/elf/dl-close.c
+++ b/libc/elf/dl-close.c
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996-2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -695,6 +695,18 @@ _dl_close_worker (struct link_map *map)
}
#endif
+ if (__builtin_expect (ns->_ns_loaded == NULL, 0)
+ && nsid == GL(dl_nns) - 1)
+ do
+ {
+ --GL(dl_nns);
+#ifndef SHARED
+ if (GL(dl_nns) == 0)
+ break;
+#endif
+ }
+ while (GL(dl_ns)[GL(dl_nns) - 1]._ns_loaded == NULL);
+
/* Notify the debugger those objects are finalized and gone. */
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
@@ -763,7 +775,7 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
libc_freeres_fn (free_mem)
{
- for (Lmid_t nsid = 0; nsid < DL_NNS; ++nsid)
+ for (Lmid_t nsid = 0; nsid < GL(dl_nns); ++nsid)
if (__builtin_expect (GL(dl_ns)[nsid]._ns_global_scope_alloc, 0) != 0
&& (GL(dl_ns)[nsid]._ns_main_searchlist->r_nlist
// XXX Check whether we need NS-specific initial_searchlist
diff --git a/libc/elf/dl-fini.c b/libc/elf/dl-fini.c
index 273bc3a99..ff4c33e80 100644
--- a/libc/elf/dl-fini.c
+++ b/libc/elf/dl-fini.c
@@ -1,5 +1,5 @@
/* Call the termination functions of loaded shared objects.
- Copyright (C) 1995,96,1998-2002,2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,1998-2002,2004-2005,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -140,7 +140,7 @@ _dl_fini (void)
int do_audit = 0;
again:
#endif
- for (Lmid_t ns = DL_NNS - 1; ns >= 0; --ns)
+ for (Lmid_t ns = GL(dl_nns) - 1; ns >= 0; --ns)
{
/* Protect against concurrent loads and unloads. */
__rtld_lock_lock_recursive (GL(dl_load_lock));
diff --git a/libc/elf/dl-iteratephdr.c b/libc/elf/dl-iteratephdr.c
index c49671583..fee19f3f0 100644
--- a/libc/elf/dl-iteratephdr.c
+++ b/libc/elf/dl-iteratephdr.c
@@ -1,5 +1,5 @@
/* Get loaded objects program headers.
- Copyright (C) 2001-2004,2006,2007,2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
@@ -47,7 +47,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
const void *caller = RETURN_ADDRESS (0);
size_t nloaded = GL(dl_ns)[0]._ns_nloaded;
Lmid_t ns = 0;
- for (Lmid_t cnt = DL_NNS - 1; cnt > 0; --cnt)
+ for (Lmid_t cnt = GL(dl_nns) - 1; cnt > 0; --cnt)
for (struct link_map *l = GL(dl_ns)[cnt]._ns_loaded; l; l = l->l_next)
{
/* We have to count the total number of loaded objects. */
diff --git a/libc/elf/dl-libc.c b/libc/elf/dl-libc.c
index a6d0d1fce..5e303f29c 100644
--- a/libc/elf/dl-libc.c
+++ b/libc/elf/dl-libc.c
@@ -1,5 +1,5 @@
/* Handle loading and unloading shared objects for internal libc purposes.
- Copyright (C) 1999-2002,2004,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002,2004,2005,2006,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.columbia.edu>, 1999.
@@ -236,7 +236,7 @@ libc_freeres_fn (free_mem)
}
/* Remove all additional names added to the objects. */
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
{
struct libname_list *lnp = l->l_libname->next;
diff --git a/libc/elf/dl-load.c b/libc/elf/dl-load.c
index 0deb51e44..0052bc22d 100644
--- a/libc/elf/dl-load.c
+++ b/libc/elf/dl-load.c
@@ -85,14 +85,6 @@
#define STRING(x) __STRING (x)
-#ifdef MAP_ANON
-/* The fd is not examined when using MAP_ANON. */
-# define ANONFD -1
-#else
-int _dl_zerofd = -1;
-# define ANONFD _dl_zerofd
-#endif
-
/* Handle situations where we have a preferred location in memory for
the shared objects. */
#ifdef ELF_PREFERRED_ADDRESS_DATA
@@ -1312,7 +1304,7 @@ cannot allocate TLS data structures for initial thread");
caddr_t mapat;
mapat = __mmap ((caddr_t) zeropage, zeroend - zeropage,
c->prot, MAP_ANON|MAP_PRIVATE|MAP_FIXED,
- ANONFD, 0);
+ -1, 0);
if (__builtin_expect (mapat == MAP_FAILED, 0))
{
errstring = N_("cannot map zero-fill pages");
@@ -1967,7 +1959,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
struct filebuf fb;
assert (nsid >= 0);
- assert (nsid < DL_NNS);
+ assert (nsid < GL(dl_nns));
/* Look for this name among those already loaded. */
for (l = GL(dl_ns)[nsid]._ns_loaded; l; l = l->l_next)
diff --git a/libc/elf/dl-minimal.c b/libc/elf/dl-minimal.c
index 5079c449f..e07029326 100644
--- a/libc/elf/dl-minimal.c
+++ b/libc/elf/dl-minimal.c
@@ -1,5 +1,5 @@
/* Minimal replacements for basic facilities used in the dynamic linker.
- Copyright (C) 1995-1998,2000-2002,2004-2006,2007
+ Copyright (C) 1995-1998,2000-2002,2004-2006,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -51,16 +51,6 @@ extern unsigned long int weak_function strtoul (const char *nptr,
void * weak_function
__libc_memalign (size_t align, size_t n)
{
-#ifdef MAP_ANON
-#define _dl_zerofd (-1)
-#else
- extern int _dl_zerofd;
-
- if (_dl_zerofd == -1)
- _dl_zerofd = _dl_sysdep_open_zero_fill ();
-#define MAP_ANON 0
-#endif
-
if (alloc_end == 0)
{
/* Consume any unused space in the last page of our data segment. */
@@ -87,7 +77,7 @@ __libc_memalign (size_t align, size_t n)
nup = GLRO(dl_pagesize);
}
page = __mmap (0, nup, PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, _dl_zerofd, 0);
+ MAP_ANON|MAP_PRIVATE, -1, 0);
if (page == MAP_FAILED)
return NULL;
if (page != alloc_end)
diff --git a/libc/elf/dl-misc.c b/libc/elf/dl-misc.c
index 6da1e2e4a..7c77cd040 100644
--- a/libc/elf/dl-misc.c
+++ b/libc/elf/dl-misc.c
@@ -1,5 +1,5 @@
/* Miscellaneous support functions for dynamic linker
- Copyright (C) 1997-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-2004, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,17 +34,6 @@
#include <stdio-common/_itoa.h>
#include <bits/libc-lock.h>
-#ifndef MAP_ANON
-/* This is the only dl-sysdep.c function that is actually needed at run-time
- by _dl_map_object. */
-
-int
-_dl_sysdep_open_zero_fill (void)
-{
- return __open ("/dev/zero", O_RDONLY);
-}
-#endif
-
/* Read the whole contents of FILE into new mmap'd space with given
protections. *SIZEP gets the size of the file. On error MAP_FAILED
is returned. */
diff --git a/libc/elf/dl-open.c b/libc/elf/dl-open.c
index 75dc7bc40..3799669ce 100644
--- a/libc/elf/dl-open.c
+++ b/libc/elf/dl-open.c
@@ -206,9 +206,6 @@ dl_open_worker (void *a)
struct dl_open_args *args = a;
const char *file = args->file;
int mode = args->mode;
- struct link_map *new;
- unsigned int i;
- bool any_tls = false;
struct link_map *call_map = NULL;
/* Check whether _dl_open() has been called from a valid DSO. */
@@ -231,7 +228,7 @@ dl_open_worker (void *a)
call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
struct link_map *l;
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
if (caller_dlopen >= (const void *) l->l_map_start
&& caller_dlopen < (const void *) l->l_map_end
@@ -262,15 +259,14 @@ dl_open_worker (void *a)
if (__builtin_expect (dst != NULL, 0))
{
size_t len = strlen (file);
- size_t required;
- char *new_file;
/* Determine how much space we need. We have to allocate the
memory locally. */
- required = DL_DST_REQUIRED (call_map, file, len, _dl_dst_count (dst, 0));
+ size_t required = DL_DST_REQUIRED (call_map, file, len,
+ _dl_dst_count (dst, 0));
/* Get space for the new file name. */
- new_file = (char *) alloca (required + 1);
+ char *new_file = (char *) alloca (required + 1);
/* Generate the new file name. */
_dl_dst_substitute (call_map, file, new_file, 0);
@@ -289,6 +285,7 @@ dl_open_worker (void *a)
}
/* Load the named object. */
+ struct link_map *new;
args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0,
mode | __RTLD_CALLMAP, args->nsid);
@@ -330,7 +327,7 @@ dl_open_worker (void *a)
mode & (__RTLD_DLOPEN | RTLD_DEEPBIND | __RTLD_AUDIT));
/* So far, so good. Now check the versions. */
- for (i = 0; i < new->l_searchlist.r_nlist; ++i)
+ for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
if (new->l_searchlist.r_list[i]->l_real->l_versions == NULL)
(void) _dl_check_map_versions (new->l_searchlist.r_list[i]->l_real,
0, 0);
@@ -412,7 +409,8 @@ dl_open_worker (void *a)
/* If the file is not loaded now as a dependency, add the search
list of the newly loaded object to the scope. */
- for (i = 0; i < new->l_searchlist.r_nlist; ++i)
+ bool any_tls = false;
+ for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
{
struct link_map *imap = new->l_searchlist.r_list[i];
@@ -552,10 +550,10 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
/* Make sure we are alone. */
__rtld_lock_lock_recursive (GL(dl_load_lock));
- if (nsid == LM_ID_NEWLM)
+ if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
{
/* Find a new namespace. */
- for (nsid = 1; nsid < DL_NNS; ++nsid)
+ for (nsid = 1; nsid < GL(dl_nns); ++nsid)
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
break;
@@ -568,16 +566,24 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
no more namespaces available for dlmopen()"));
}
+ if (nsid == GL(dl_nns))
+ ++GL(dl_nns);
+
_dl_debug_initialize (0, nsid)->r_state = RT_CONSISTENT;
}
/* Never allow loading a DSO in a namespace which is empty. Such
direct placements is only causing problems. Also don't allow
loading into a namespace used for auditing. */
- else if (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER
+ else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0)
&& (GL(dl_ns)[nsid]._ns_nloaded == 0
|| GL(dl_ns)[nsid]._ns_loaded->l_auditing))
_dl_signal_error (EINVAL, file, NULL,
N_("invalid target namespace in dlmopen()"));
+#ifndef SHARED
+ else if (nsid == LM_ID_BASE && GL(dl_ns)[LM_ID_BASE]._ns_loaded == NULL
+ && GL(dl_nns) == 0)
+ GL(dl_nns) = 1;
+#endif
struct dl_open_args args;
args.file = file;
diff --git a/libc/elf/dl-support.c b/libc/elf/dl-support.c
index 59a8dd9b9..bcf0e2a56 100644
--- a/libc/elf/dl-support.c
+++ b/libc/elf/dl-support.c
@@ -70,6 +70,7 @@ int _dl_bind_not;
/* Namespace information. */
struct link_namespaces _dl_ns[DL_NNS];
+size_t _dl_nns;
/* Incremented whenever something may have been added to dl_loaded. */
unsigned long long _dl_load_adds;
diff --git a/libc/elf/dl-sym.c b/libc/elf/dl-sym.c
index 43c8274b7..740bb9a89 100644
--- a/libc/elf/dl-sym.c
+++ b/libc/elf/dl-sym.c
@@ -1,5 +1,5 @@
/* Look up a symbol in a shared object loaded by `dlopen'.
- Copyright (C) 1999-2002,2004,2006,2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002,2004,2006,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -95,7 +95,7 @@ do_sym (void *handle, const char *name, void *who,
struct link_map *match = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
/* Find the highest-addressed object that CALLER is not below. */
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL;
l = l->l_next)
if (caller >= l->l_map_start && caller < l->l_map_end
diff --git a/libc/elf/do-lookup.h b/libc/elf/do-lookup.h
index 41e5fc137..ae74da484 100644
--- a/libc/elf/do-lookup.h
+++ b/libc/elf/do-lookup.h
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
- Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -79,18 +79,18 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
__attribute_noinline__
check_match (const ElfW(Sym) *sym)
{
+ unsigned int stt = ELFW(ST_TYPE) (sym->st_info);
assert (ELF_RTYPE_CLASS_PLT == 1);
if (__builtin_expect ((sym->st_value == 0 /* No value. */
- && ELFW(ST_TYPE) (sym->st_info) != STT_TLS)
+ && stt != STT_TLS)
|| (type_class & (sym->st_shndx == SHN_UNDEF)),
0))
return NULL;
- if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC
- && ELFW(ST_TYPE) (sym->st_info) != STT_COMMON
- && ELFW(ST_TYPE) (sym->st_info) != STT_TLS
- && ELFW(ST_TYPE) (sym->st_info) != STT_GNU_IFUNC,
- 0))
+ if (__builtin_expect (stt > STT_FUNC
+ && stt != STT_COMMON
+ && stt != STT_TLS
+ && stt != STT_GNU_IFUNC, 0))
/* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, STT_COMMON,
STT_TLS, and STT_GNU_IFUNC since these are no code/data
definitions. */
diff --git a/libc/elf/elf.h b/libc/elf/elf.h
index cd74d510e..625935026 100644
--- a/libc/elf/elf.h
+++ b/libc/elf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2003,2004,2005,2006,2007,2008
+ Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -1246,6 +1246,7 @@ typedef struct
#define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */
#define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */
#define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */
+#define R_SPARC_GLOB_JMP 42 /* was part of v9 ABI but was removed */
#define R_SPARC_7 43 /* Direct 7 bit */
#define R_SPARC_5 44 /* Direct 5 bit */
#define R_SPARC_6 45 /* Direct 6 bit */
@@ -1283,8 +1284,19 @@ typedef struct
#define R_SPARC_TLS_DTPOFF64 77
#define R_SPARC_TLS_TPOFF32 78
#define R_SPARC_TLS_TPOFF64 79
+#define R_SPARC_GOTDATA_HIX22 80
+#define R_SPARC_GOTDATA_LOX10 81
+#define R_SPARC_GOTDATA_OP_HIX22 82
+#define R_SPARC_GOTDATA_OP_LOX10 83
+#define R_SPARC_GOTDATA_OP 84
+#define R_SPARC_H34 85
+#define R_SPARC_SIZE32 86
+#define R_SPARC_SIZE64 87
+#define R_SPARC_GNU_VTINHERIT 250
+#define R_SPARC_GNU_VTENTRY 251
+#define R_SPARC_REV32 252
/* Keep this the last entry. */
-#define R_SPARC_NUM 80
+#define R_SPARC_NUM 253
/* For Sparc64, legal values for d_tag of Elf64_Dyn. */
diff --git a/libc/elf/rtld.c b/libc/elf/rtld.c
index bfe956446..69c27cc4a 100644
--- a/libc/elf/rtld.c
+++ b/libc/elf/rtld.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/mman.h> /* Check if MAP_ANON is defined. */
+#include <sys/mman.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <ldsodefs.h>
@@ -125,8 +125,9 @@ struct rtld_global _rtld_global =
/* Default presumption without further information is executable stack. */
._dl_stack_flags = PF_R|PF_W|PF_X,
#ifdef _LIBC_REENTRANT
- ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER
+ ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
#endif
+ ._dl_nns = 1
};
/* If we would use strong_alias here the compiler would see a
non-hidden definition. This would undo the effect of the previous
@@ -1782,12 +1783,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
for (i = main_map->l_searchlist.r_nlist; i > 0; )
main_map->l_searchlist.r_list[--i]->l_global = 1;
-#ifndef MAP_ANON
- /* We are done mapping things, so close the zero-fill descriptor. */
- __close (_dl_zerofd);
- _dl_zerofd = -1;
-#endif
-
/* Remove _dl_rtld_map from the chain. */
GL(dl_rtld_map).l_prev->l_next = GL(dl_rtld_map).l_next;
if (GL(dl_rtld_map).l_next != NULL)
@@ -2759,7 +2754,7 @@ print_statistics (hp_timing_t *rtld_total_timep)
#endif
unsigned long int num_relative_relocations = 0;
- for (Lmid_t ns = 0; ns < DL_NNS; ++ns)
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
{
if (GL(dl_ns)[ns]._ns_loaded == NULL)
continue;
diff --git a/libc/localedata/ChangeLog b/libc/localedata/ChangeLog
index 17f26f68c..8958c21bb 100644
--- a/libc/localedata/ChangeLog
+++ b/libc/localedata/ChangeLog
@@ -1,3 +1,20 @@
+2009-04-07 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/ks_IN@devanagari: Replace duplicated information with copy.
+ Fix title. Patch by Pravin Satpute <psatpute@redhat.com>.
+
+2009-04-06 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/ks_IN: New file.
+ Patch by Mohammad Nayeem <mohammad.nayeem@gmail.com> and
+ Pravin Satpute <psatpute@redhat.com>.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #9985]
+ * charmaps/UTF-8: Fix encoding of <U1080>..<U109F>, <U12AF>.
+ Based on patch by Keith Stribley <devel@thanlwinsoft.org>.
+
2009-03-15 Ulrich Drepper <drepper@redhat.com>
[BZ #9844]
diff --git a/libc/localedata/charmaps/UTF-8 b/libc/localedata/charmaps/UTF-8
index 34b2f7ee8..736a28333 100644
--- a/libc/localedata/charmaps/UTF-8
+++ b/libc/localedata/charmaps/UTF-8
@@ -3325,34 +3325,34 @@ CHARMAP
<U107D> /xe1/x81/xbd MYANMAR LETTER SHAN PHA
<U107E> /xe1/x81/xbe MYANMAR LETTER SHAN FA
<U107F> /xe1/x81/xbf MYANMAR LETTER SHAN BA
-<U1080> /xe1/x81/x80 MYANMAR LETTER SHAN THA
-<U1081> /xe1/x81/x81 MYANMAR LETTER SHAN HA
-<U1082> /xe1/x81/x82 MYANMAR CONSONANT SIGN SHAN MEDIAL WA
-<U1083> /xe1/x81/x83 MYANMAR VOWEL SIGN SHAN AA
-<U1084> /xe1/x81/x84 MYANMAR VOWEL SIGN SHAN E
-<U1085> /xe1/x81/x85 MYANMAR VOWEL SIGN SHAN E ABOVE
-<U1086> /xe1/x81/x86 MYANMAR VOWEL SIGN SHAN FINAL Y
-<U1087> /xe1/x81/x87 MYANMAR SIGN SHAN TONE-2
-<U1088> /xe1/x81/x88 MYANMAR SIGN SHAN TONE-3
-<U1089> /xe1/x81/x89 MYANMAR SIGN SHAN TONE-5
-<U108A> /xe1/x81/x8a MYANMAR SIGN SHAN TONE-6
-<U108B> /xe1/x81/x8b MYANMAR SIGN SHAN COUNCIL TONE-2
-<U108C> /xe1/x81/x8c MYANMAR SIGN SHAN COUNCIL TONE-3
-<U108D> /xe1/x81/x8d MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
-<U108E> /xe1/x81/x8e MYANMAR LETTER RUMAI PALAUNG FA
-<U108F> /xe1/x81/x8f MYANMAR SIGN RUMAI PALAUNG TONE-5
-<U1090> /xe1/x81/x90 MYANMAR SHAN DIGIT ZERO
-<U1091> /xe1/x81/x91 MYANMAR SHAN DIGIT ONE
-<U1092> /xe1/x81/x92 MYANMAR SHAN DIGIT TWO
-<U1093> /xe1/x81/x93 MYANMAR SHAN DIGIT THREE
-<U1094> /xe1/x81/x94 MYANMAR SHAN DIGIT FOUR
-<U1095> /xe1/x81/x95 MYANMAR SHAN DIGIT FIVE
-<U1096> /xe1/x81/x96 MYANMAR SHAN DIGIT SIX
-<U1097> /xe1/x81/x97 MYANMAR SHAN DIGIT SEVEN
-<U1098> /xe1/x81/x98 MYANMAR SHAN DIGIT EIGHT
-<U1099> /xe1/x81/x99 MYANMAR SHAN DIGIT NINE
-<U109E> /xe1/x81/x9e MYANMAR SYMBOL SHAN ONE
-<U109F> /xe1/x81/x9f MYANMAR SYMBOL SHAN EXCLAMATION
+<U1080> /xe1/x82/x80 MYANMAR LETTER SHAN THA
+<U1081> /xe1/x82/x81 MYANMAR LETTER SHAN HA
+<U1082> /xe1/x82/x82 MYANMAR CONSONANT SIGN SHAN MEDIAL WA
+<U1083> /xe1/x82/x83 MYANMAR VOWEL SIGN SHAN AA
+<U1084> /xe1/x82/x84 MYANMAR VOWEL SIGN SHAN E
+<U1085> /xe1/x82/x85 MYANMAR VOWEL SIGN SHAN E ABOVE
+<U1086> /xe1/x82/x86 MYANMAR VOWEL SIGN SHAN FINAL Y
+<U1087> /xe1/x82/x87 MYANMAR SIGN SHAN TONE-2
+<U1088> /xe1/x82/x88 MYANMAR SIGN SHAN TONE-3
+<U1089> /xe1/x82/x89 MYANMAR SIGN SHAN TONE-5
+<U108A> /xe1/x82/x8a MYANMAR SIGN SHAN TONE-6
+<U108B> /xe1/x82/x8b MYANMAR SIGN SHAN COUNCIL TONE-2
+<U108C> /xe1/x82/x8c MYANMAR SIGN SHAN COUNCIL TONE-3
+<U108D> /xe1/x82/x8d MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
+<U108E> /xe1/x82/x8e MYANMAR LETTER RUMAI PALAUNG FA
+<U108F> /xe1/x82/x8f MYANMAR SIGN RUMAI PALAUNG TONE-5
+<U1090> /xe1/x82/x90 MYANMAR SHAN DIGIT ZERO
+<U1091> /xe1/x82/x91 MYANMAR SHAN DIGIT ONE
+<U1092> /xe1/x82/x92 MYANMAR SHAN DIGIT TWO
+<U1093> /xe1/x82/x93 MYANMAR SHAN DIGIT THREE
+<U1094> /xe1/x82/x94 MYANMAR SHAN DIGIT FOUR
+<U1095> /xe1/x82/x95 MYANMAR SHAN DIGIT FIVE
+<U1096> /xe1/x82/x96 MYANMAR SHAN DIGIT SIX
+<U1097> /xe1/x82/x97 MYANMAR SHAN DIGIT SEVEN
+<U1098> /xe1/x82/x98 MYANMAR SHAN DIGIT EIGHT
+<U1099> /xe1/x82/x99 MYANMAR SHAN DIGIT NINE
+<U109E> /xe1/x82/x9e MYANMAR SYMBOL SHAN ONE
+<U109F> /xe1/x82/x9f MYANMAR SYMBOL SHAN EXCLAMATION
<U10A0> /xe1/x82/xa0 GEORGIAN CAPITAL LETTER AN
<U10A1> /xe1/x82/xa1 GEORGIAN CAPITAL LETTER BAN
<U10A2> /xe1/x82/xa2 GEORGIAN CAPITAL LETTER GAN
@@ -3841,7 +3841,7 @@ CHARMAP
<U12AC> /xe1/x8a/xac ETHIOPIC SYLLABLE KEE
<U12AD> /xe1/x8a/xad ETHIOPIC SYLLABLE KE
<U12AE> /xe1/x8a/xae ETHIOPIC SYLLABLE KO
-<U12AF> /xe1/x8a/x8f ETHIOPIC SYLLABLE KOA
+<U12AF> /xe1/x8a/xaf ETHIOPIC SYLLABLE KOA
<U12B0> /xe1/x8a/xb0 ETHIOPIC SYLLABLE KWA
<U12B2> /xe1/x8a/xb2 ETHIOPIC SYLLABLE KWI
<U12B3> /xe1/x8a/xb3 ETHIOPIC SYLLABLE KWAA
@@ -27034,12 +27034,12 @@ CHARMAP
<U000103C3> /xf0/x90/x8f/x83 OLD PERSIAN SIGN HA
<U000103C8> /xf0/x90/x8f/x88 OLD PERSIAN SIGN AURAMAZDAA
<U000103C9> /xf0/x90/x8f/x89 OLD PERSIAN SIGN AURAMAZDAA-2
-<U000103CA> /xf0/x90/x8f/x8A OLD PERSIAN SIGN AURAMAZDAAHA
-<U000103CB> /xf0/x90/x8f/x8B OLD PERSIAN SIGN XSHAAYATHIYA
-<U000103CC> /xf0/x90/x8f/x8C OLD PERSIAN SIGN DAHYAAUSH
-<U000103CD> /xf0/x90/x8f/x8D OLD PERSIAN SIGN DAHYAAUSH-2
-<U000103CE> /xf0/x90/x8f/x8E OLD PERSIAN SIGN BAGA
-<U000103CF> /xf0/x90/x8f/x8F OLD PERSIAN SIGN BUUMISH
+<U000103CA> /xf0/x90/x8f/x8a OLD PERSIAN SIGN AURAMAZDAAHA
+<U000103CB> /xf0/x90/x8f/x8b OLD PERSIAN SIGN XSHAAYATHIYA
+<U000103CC> /xf0/x90/x8f/x8c OLD PERSIAN SIGN DAHYAAUSH
+<U000103CD> /xf0/x90/x8f/x8d OLD PERSIAN SIGN DAHYAAUSH-2
+<U000103CE> /xf0/x90/x8f/x8e OLD PERSIAN SIGN BAGA
+<U000103CF> /xf0/x90/x8f/x8f OLD PERSIAN SIGN BUUMISH
<U000103D0> /xf0/x90/x8f/x90 OLD PERSIAN WORD DIVIDER
<U000103D1> /xf0/x90/x8f/x91 OLD PERSIAN NUMBER ONE
<U000103D2> /xf0/x90/x8f/x92 OLD PERSIAN NUMBER TWO
diff --git a/libc/localedata/locales/ks_IN b/libc/localedata/locales/ks_IN
new file mode 100644
index 000000000..5d53c934a
--- /dev/null
+++ b/libc/localedata/locales/ks_IN
@@ -0,0 +1,211 @@
+comment_char %
+escape_char /
+% Kashmiri language locale for India.
+% Contributed by Pravin Satpute <psatpute@redhat.com> and
+% Mr. Mohammad Nayeem <mohammad.nayeem@gmail.com>
+
+LC_IDENTIFICATION
+
+title "Kashmiri language locale for India"
+source "Red Hat, Pune"
+address "Marisfot III, Marigold Premises, East-Wing, Kalyaninagar, Pune, India-411014"
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Kashmiri"
+territory "India"
+revision "1.0"
+date "2009,April,06"
+%
+category "ks_IN:2009";LC_IDENTIFICATION
+category "ks_IN:2009";LC_CTYPE
+category "ks_IN:2009";LC_COLLATE
+category "ks_IN:2009";LC_TIME
+category "ks_IN:2009";LC_NUMERIC
+category "ks_IN:2009";LC_MONETARY
+category "ks_IN:2009";LC_MESSAGES
+category "ks_IN:2009";LC_PAPER
+category "ks_IN:2009";LC_NAME
+category "ks_IN:2009";LC_ADDRESS
+category "ks_IN:2009";LC_TELEPHONE
+
+
+END LC_IDENTIFICATION
+
+
+LC_CTYPE
+copy "i18n"
+
+translit_start
+include "translit_combining";""
+translit_end
+END LC_CTYPE
+
+
+LC_COLLATE
+% Copy the template from ISO/IEC 14651
+copy "iso14651_t1"
+
+END LC_COLLATE
+
+
+LC_MONETARY
+% This is the POSIX Locale definition the LC_MONETARY category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale defintion file
+% for IBM Class for Unicode.
+%
+int_curr_symbol "<U0049><U004E><U0052><U0020>"
+currency_symbol "<U20A8>"
+mon_decimal_point "<U002E>"
+mon_thousands_sep "<U002C>"
+mon_grouping 3
+positive_sign ""
+negative_sign "<U002D>"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sep_by_space 1
+n_cs_precedes 1
+n_sep_by_space 1
+p_sign_posn 1
+n_sign_posn 1
+%
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U0622><U062A><U0647><U0648><U0627><U0631>";/
+ "<U0698><U0621><U0646><U062A><U0631><U0648><U0627><U0631>";/
+ "<U0628><U0648><U0621><U06BA><U0648><U0627><U0631>";/
+ "<U0628><U0648><U062F><U0647><U0648><U0627><U0631>";/
+ "<U0628><U0631><U0649><U0633><U0648><U0627><U0631>";/
+ "<U062C><U0645><U0639>";"<U0628><U0679><U0648><U0627><U0631>"
+%
+% Full weekday names (%A)
+day "<U0622><U062A><U0647><U0648><U0627><U0631>";/
+ "<U0698><U0621><U0646><U062F><U0631><U0648><U0627><U0631>";/
+ "<U0628><U0648><U0621><U06BA><U0648><U0627><U0631>";/
+ "<U0628><U0648><U062F><U0647><U0648><U0627><U0631>";/
+ "<U0628><U0631><U0649><U0633><U0648><U0627><U0631>";/
+ "<U062C><U0645><U0639>";"<U0628><U0679><U0648><U0627><U0631>"
+%
+% Abbreviated month names (%b)
+abmon "<U062C><U0646><U0648><U0631><U06CC>";/
+ "<U0641><U0631><U0648><U0631><U06CC>";/
+ "<U0645><U0627><U0631><U0686>";/
+ "<U0627><U067E><U0631><U06CC><U0644>";/
+ "<U0645><U0626>";/
+ "<U062C><U0648><U0646>";/
+ "<U062C><U064F><U0644><U0626>";/
+ "<U0627><U06AF><U0633><U062A>";/
+ "<U0633><U062A><U0646><U0628><U0631>";/
+ "<U0627><U06A9><U062A><U0648><U0628><U0631>";/
+ "<U0646><U0648><U06BA><U0628><U0631>";/
+ "<U062F><U0633><U0646><U0628><U0631>"
+%
+% Full month names (%B)
+mon "<U062C><U0646><U0648><U0631><U06CC>";/
+ "<U0641><U0631><U0648><U0631><U06CC>";/
+ "<U0645><U0627><U0631><U0686>";/
+ "<U0627><U067E><U0631><U06CC><U0644>";/
+ "<U0645><U0626>";/
+ "<U062C><U0648><U0646>";/
+ "<U062C><U064F><U0644><U0626>";/
+ "<U0627><U06AF><U0633><U062A>";/
+ "<U0633><U062A><U0646><U0628><U0631>";/
+ "<U0627><U06A9><U062A><U0648><U0628><U0631>";/
+ "<U0646><U0648><U06BA><U0628><U0631>";/
+ "<U062F><U0633><U0646><U0628><U0631>"
+%
+% Equivalent of AM PM
+am_pm "<U062F><U0648><U067E><U06BE><U0631><U0628><U0631><U0648><U0646><U06BE>";/
+ "<U062F><U0648><U067E><U06BE><U0631><U067E><U062A><U06BE>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+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>"
+END LC_TIME
+
+
+LC_MESSAGES
+yesexpr "<U005E><U005B><U0622><U0079><U0059><U005D><U002E><U002A>"
+noexpr "<U005E><U005B><U0646><U006E><U004E><U005D><U002E><U002A>"
+
+yesstr "<U0622>"
+nostr "<U0646><U0639>"
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074><U0025><U0067>"
+name_gen ""
+name_mr "<U062C><U0646><U0627><U0628>"
+name_mrs "<U0645><U0633><U0645><U0627><U062A>"
+name_miss "<U0645><U0633><U0645><U0627><U062A>"
+name_ms "<U0645><U062d><U062a><U0631><U0645><U0647>"
+
+END LC_NAME
+
+
+LC_ADDRESS
+% This is the ISO_IEC TR14652 Locale definition for the LC_ADDRESS category
+% generated by IBM Basic CountryPack Transformer.
+postal_fmt "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073><U0025><U0062><U0025><U0065><U0025><U0072>"
+country_ab2 "<U0049><U004E>"
+country_ab3 "<U0049><U004E><U0044>"
+country_num 356
+
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "hi_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "hi_IN"
+END LC_MEASUREMENT
diff --git a/libc/localedata/locales/ks_IN@devanagari b/libc/localedata/locales/ks_IN@devanagari
index 2e55de75b..ebc523481 100644
--- a/libc/localedata/locales/ks_IN@devanagari
+++ b/libc/localedata/locales/ks_IN@devanagari
@@ -1,11 +1,11 @@
comment_char %
escape_char /
-% Kashmiri language locale for India.
+% Kashmiri(devanagari) language locale for India.
% Contributed by Rakesh Pandit <rakesh.pandit@gmail.com> and
% Pravin Satpute <psatpute@redhat.com>
LC_IDENTIFICATION
-title "Kashmiri language locale for India"
+title "Kashmiri(devanagari) language locale for India"
source ""
address ""
contact ""
@@ -32,51 +32,20 @@ category "ks_IN@devanagari:2008";LC_TELEPHONE
END LC_IDENTIFICATION
LC_CTYPE
-copy "i18n"
-
-translit_start
-include "translit_combining";""
-translit_end
+copy "ks_IN"
END LC_CTYPE
LC_COLLATE
-
-% Copy the template from ISO/IEC 14651
-copy "iso14651_t1"
-
+copy "ks_IN"
END LC_COLLATE
LC_MONETARY
-% This is the POSIX Locale definition the LC_MONETARY category.
-% These are generated based on XML base Locale difintion file
-% for IBM Class for Unicode/Java
-%
-int_curr_symbol "<U0049><U004E><U0052><U0020>"
-currency_symbol "<U0930><U0942>"
-mon_decimal_point "<U002E>"
-mon_thousands_sep "<U002C>"
-mon_grouping 3
-positive_sign ""
-negative_sign "<U002D>"
-int_frac_digits 2
-frac_digits 2
-p_cs_precedes 1
-p_sep_by_space 1
-n_cs_precedes 1
-n_sep_by_space 1
-p_sign_posn 1
-n_sign_posn 1
-%
+copy "ks_IN"
END LC_MONETARY
LC_NUMERIC
-% This is the POSIX Locale definition for the LC_NUMERIC category.
-%
-decimal_point "<U002E>"
-thousands_sep "<U002C>"
-grouping 3
-%
+copy "ks_IN"
END LC_NUMERIC
@@ -185,12 +154,7 @@ END LC_NAME
LC_ADDRESS
-postal_fmt "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073>/
-<U0025><U0062><U0025><U0065><U0025><U0072>"
-
-country_ab2 "<U0049><U004E>"
-country_ab3 "<U0049><U004E><U0044>"
-country_num 356
+copy "ks_IN"
END LC_ADDRESS
diff --git a/libc/malloc/Versions b/libc/malloc/Versions
index 0c578f95b..cf0b1e559 100644
--- a/libc/malloc/Versions
+++ b/libc/malloc/Versions
@@ -55,6 +55,9 @@ libc {
# p*
posix_memalign;
}
+ GLIBC_2.10 {
+ malloc_info;
+ }
GLIBC_PRIVATE {
# Internal startup hook for libpthread.
__libc_malloc_pthread_startup;
diff --git a/libc/malloc/hooks.c b/libc/malloc/hooks.c
index fe89db83f..72c29293d 100644
--- a/libc/malloc/hooks.c
+++ b/libc/malloc/hooks.c
@@ -358,7 +358,7 @@ realloc_check(oldmem, bytes, caller)
if (top_check() >= 0) {
INTERNAL_SIZE_T nb;
checked_request2size(bytes + 1, nb);
- newmem = _int_realloc(&main_arena, oldp, nb);
+ newmem = _int_realloc(&main_arena, oldp, oldsize, nb);
}
#if 0 /* Erase freed memory. */
if(newmem)
@@ -501,7 +501,7 @@ free_starter(mem, caller) Void_t* mem; const Void_t *caller;
then the hooks are reset to 0. */
#define MALLOC_STATE_MAGIC 0x444c4541l
-#define MALLOC_STATE_VERSION (0*0x100l + 3l) /* major*0x100 + minor */
+#define MALLOC_STATE_VERSION (0*0x100l + 4l) /* major*0x100 + minor */
struct malloc_save_state {
long magic;
@@ -521,6 +521,10 @@ struct malloc_save_state {
unsigned long mmapped_mem;
unsigned long max_mmapped_mem;
int using_malloc_checking;
+ unsigned long max_fast;
+ unsigned long arena_test;
+ unsigned long arena_max;
+ unsigned long narenas;
};
Void_t*
@@ -568,6 +572,12 @@ public_gET_STATe(void)
ms->mmapped_mem = mp_.mmapped_mem;
ms->max_mmapped_mem = mp_.max_mmapped_mem;
ms->using_malloc_checking = using_malloc_checking;
+ ms->max_fast = get_max_fast();
+#ifdef PER_THREAD
+ ms->arena_test = mp_.arena_test;
+ ms->arena_max = mp_.arena_max;
+ ms->narenas = narenas;
+#endif
(void)mutex_unlock(&main_arena.mutex);
return (Void_t*)ms;
}
@@ -587,7 +597,10 @@ public_sET_STATe(Void_t* msptr)
(void)mutex_lock(&main_arena.mutex);
/* There are no fastchunks. */
clear_fastchunks(&main_arena);
- set_max_fast(DEFAULT_MXFAST);
+ if (ms->version >= 4)
+ set_max_fast(ms->max_fast);
+ else
+ set_max_fast(64); /* 64 used to be the value we always used. */
for (i=0; i<NFASTBINS; ++i)
fastbin (&main_arena, i) = 0;
for (i=0; i<BINMAPSIZE; ++i)
@@ -663,6 +676,13 @@ public_sET_STATe(Void_t* msptr)
using_malloc_checking = 0;
}
}
+ if (ms->version >= 4) {
+#ifdef PER_THREAD
+ mp_.arena_test = ms->arena_test;
+ mp_.arena_max = ms->arena_max;
+ narenas = ms->narenas;
+#endif
+ }
check_malloc_state(&main_arena);
(void)mutex_unlock(&main_arena.mutex);
diff --git a/libc/malloc/malloc.c b/libc/malloc/malloc.c
index bb7ea36c8..17e4e03ba 100644
--- a/libc/malloc/malloc.c
+++ b/libc/malloc/malloc.c
@@ -1586,7 +1586,8 @@ static void _int_free(mstate, mchunkptr, int);
#else
static void _int_free(mstate, mchunkptr);
#endif
-static Void_t* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T);
+static Void_t* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
+ INTERNAL_SIZE_T);
static Void_t* _int_memalign(mstate, size_t, size_t);
static Void_t* _int_valloc(mstate, size_t);
static Void_t* _int_pvalloc(mstate, size_t);
@@ -3778,7 +3779,7 @@ public_rEALLOc(Void_t* oldmem, size_t bytes)
tsd_setspecific(arena_key, (Void_t *)ar_ptr);
#endif
- newp = _int_realloc(ar_ptr, oldp, nb);
+ newp = _int_realloc(ar_ptr, oldp, oldsize, nb);
(void)mutex_unlock(&ar_ptr->mutex);
assert(!newp || chunk_is_mmapped(mem2chunk(newp)) ||
@@ -5102,7 +5103,8 @@ static void malloc_consolidate(av) mstate av;
*/
Void_t*
-_int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T nb)
+_int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
+ INTERNAL_SIZE_T nb)
{
mchunkptr newp; /* chunk to return */
INTERNAL_SIZE_T newsize; /* its size */
@@ -5123,28 +5125,25 @@ _int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T nb)
const char *errstr = NULL;
- /* Simple tests for old block integrity. */
- if (__builtin_expect (misaligned_chunk (oldp), 0))
- {
- errstr = "realloc(): invalid pointer";
- errout:
- malloc_printerr (check_action, errstr, chunk2mem(oldp));
- return NULL;
- }
-
/* oldmem size */
- const INTERNAL_SIZE_T oldsize = chunksize(oldp);
-
if (__builtin_expect (oldp->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (oldsize >= av->system_mem, 0))
{
errstr = "realloc(): invalid old size";
- goto errout;
+ errout:
+ malloc_printerr (check_action, errstr, chunk2mem(oldp));
+ return NULL;
}
check_inuse_chunk(av, oldp);
- if (!chunk_is_mmapped(oldp)) {
+ /* All callers already filter out mmap'ed chunks. */
+#if 0
+ if (!chunk_is_mmapped(oldp))
+#else
+ assert (!chunk_is_mmapped(oldp));
+#endif
+ {
next = chunk_at_offset(oldp, oldsize);
INTERNAL_SIZE_T nextsize = chunksize(next);
@@ -5271,6 +5270,7 @@ _int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T nb)
return chunk2mem(newp);
}
+#if 0
/*
Handle mmap cases
*/
@@ -5339,6 +5339,7 @@ _int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T nb)
return 0;
#endif
}
+#endif
}
/*
@@ -6218,6 +6219,152 @@ __posix_memalign (void **memptr, size_t alignment, size_t size)
}
weak_alias (__posix_memalign, posix_memalign)
+
+int
+malloc_info (int options, FILE *fp)
+{
+ /* For now, at least. */
+ if (options != 0)
+ return EINVAL;
+
+ int n = 0;
+ size_t total_nblocks = 0;
+ size_t total_nfastblocks = 0;
+ size_t total_avail = 0;
+ size_t total_fastavail = 0;
+
+ void mi_arena (mstate ar_ptr)
+ {
+ fprintf (fp, "<heap nr=\"%d\">\n<sizes>\n", n++);
+
+ size_t nblocks = 0;
+ size_t nfastblocks = 0;
+ size_t avail = 0;
+ size_t fastavail = 0;
+ struct
+ {
+ size_t from;
+ size_t to;
+ size_t total;
+ size_t count;
+ } sizes[NFASTBINS + NBINS - 1];
+#define nsizes (sizeof (sizes) / sizeof (sizes[0]))
+
+ mutex_lock (&ar_ptr->mutex);
+
+ for (size_t i = 0; i < NFASTBINS; ++i)
+ {
+ mchunkptr p = fastbin (ar_ptr, i);
+ if (p != NULL)
+ {
+ size_t nthissize = 0;
+ size_t thissize = chunksize (p);
+
+ while (p != NULL)
+ {
+ ++nthissize;
+ p = p->fd;
+ }
+
+ fastavail += nthissize * thissize;
+ nfastblocks += nthissize;
+ sizes[i].from = thissize - (MALLOC_ALIGNMENT - 1);
+ sizes[i].to = thissize;
+ sizes[i].count = nthissize;
+ }
+ else
+ sizes[i].from = sizes[i].to = sizes[i].count = 0;
+
+ sizes[i].total = sizes[i].count * sizes[i].to;
+ }
+
+ mbinptr bin = bin_at (ar_ptr, 1);
+ struct malloc_chunk *r = bin->fd;
+ while (r != bin)
+ {
+ ++sizes[NFASTBINS].count;
+ sizes[NFASTBINS].total += r->size;
+ sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size);
+ sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size);
+ r = r->fd;
+ }
+ nblocks += sizes[NFASTBINS].count;
+ avail += sizes[NFASTBINS].total;
+
+ for (size_t i = 2; i < NBINS; ++i)
+ {
+ bin = bin_at (ar_ptr, i);
+ r = bin->fd;
+ sizes[NFASTBINS - 1 + i].from = ~((size_t) 0);
+ sizes[NFASTBINS - 1 + i].to = sizes[NFASTBINS - 1 + i].total
+ = sizes[NFASTBINS - 1 + i].count = 0;
+
+ while (r != bin)
+ {
+ ++sizes[NFASTBINS - 1 + i].count;
+ sizes[NFASTBINS - 1 + i].total += r->size;
+ sizes[NFASTBINS - 1 + i].from = MIN (sizes[NFASTBINS - 1 + i].from,
+ r->size);
+ sizes[NFASTBINS - 1 + i].to = MAX (sizes[NFASTBINS - 1 + i].to,
+ r->size);
+
+ r = r->fd;
+ }
+
+ if (sizes[NFASTBINS - 1 + i].count == 0)
+ sizes[NFASTBINS - 1 + i].from = 0;
+ nblocks += sizes[NFASTBINS - 1 + i].count;
+ avail += sizes[NFASTBINS - 1 + i].total;
+ }
+
+ mutex_unlock (&ar_ptr->mutex);
+
+ total_nfastblocks += nfastblocks;
+ total_fastavail += fastavail;
+
+ total_nblocks += nblocks;
+ total_avail += avail;
+
+ for (size_t i = 0; i < nsizes; ++i)
+ if (sizes[i].count != 0 && i != NFASTBINS)
+ fprintf (fp, "\
+<size from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n",
+ sizes[i].from, sizes[i].to, sizes[i].total, sizes[i].count);
+
+ if (sizes[NFASTBINS].count != 0)
+ fprintf (fp, "\
+<unsorted from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n",
+ sizes[NFASTBINS].from, sizes[NFASTBINS].to,
+ sizes[NFASTBINS].total, sizes[NFASTBINS].count);
+
+ fprintf (fp,
+ "</sizes>\n<total type=\"fast\" count=\"%zu\" size=\"%zu\"/>\n"
+ "<total type=\"rest\" count=\"%zu\" size=\"%zu\"/>\n"
+ "</heap>\n",
+ nfastblocks, fastavail, nblocks, avail);
+ }
+
+ fputs ("<malloc version=\"1\">\n", fp);
+
+ /* Iterate over all arenas currently in use. */
+ mstate ar_ptr = &main_arena;
+ do
+ {
+ mi_arena (ar_ptr);
+ ar_ptr = ar_ptr->next;
+ }
+ while (ar_ptr != &main_arena);
+
+ fprintf (fp,
+ "<total type=\"fast\" count=\"%zu\" size=\"%zu\"/>\n"
+ "<total type=\"rest\" count=\"%zu\" size=\"%zu\"/>\n"
+ "</malloc>\n",
+ total_nfastblocks, total_fastavail, total_nblocks, total_avail);
+
+ return 0;
+}
+
+
strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)
strong_alias (__libc_free, __cfree) weak_alias (__libc_free, cfree)
strong_alias (__libc_free, __free) strong_alias (__libc_free, free)
diff --git a/libc/malloc/malloc.h b/libc/malloc/malloc.h
index 2c0ee35c4..d0aedc0cd 100644
--- a/libc/malloc/malloc.h
+++ b/libc/malloc/malloc.h
@@ -23,6 +23,7 @@
#include <features.h>
#include <stddef.h>
+#include <stdio.h>
# define __malloc_ptr_t void *
/* Used by GNU libc internals. */
@@ -144,6 +145,9 @@ extern size_t malloc_usable_size __MALLOC_P ((void *__ptr));
/* Prints brief summary statistics on stderr. */
extern void malloc_stats __MALLOC_P ((void));
+/* Output information about state of allocator to stream FP. */
+extern int malloc_info (int __options, FILE *__fp);
+
/* Record the state of all malloc variables in an opaque data structure. */
extern void *malloc_get_state __MALLOC_P ((void));
diff --git a/libc/misc/Makefile b/libc/misc/Makefile
index ee195d15f..81958e66f 100644
--- a/libc/misc/Makefile
+++ b/libc/misc/Makefile
@@ -38,7 +38,7 @@ headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h
routines := brk sbrk sstk ioctl \
- readv writev \
+ readv writev preadv preadv64 pwritev pwritev64 \
setreuid setregid \
seteuid setegid \
getpagesize \
diff --git a/libc/misc/Versions b/libc/misc/Versions
index b182f1231..c930eea94 100644
--- a/libc/misc/Versions
+++ b/libc/misc/Versions
@@ -137,4 +137,7 @@ libc {
GLIBC_2.7 {
mkostemp; mkostemp64;
}
+ GLIBC_2.10 {
+ preadv; preadv64; pwritev; pwritev64;
+ }
}
diff --git a/libc/misc/preadv.c b/libc/misc/preadv.c
new file mode 100644
index 000000000..3e2cc689e
--- /dev/null
+++ b/libc/misc/preadv.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by VECTOR, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in VECTOR instead
+ of a contiguous buffer. */
+ssize_t
+preadv (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ off_t offset;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (preadv)
+#include <stub-tag.h>
diff --git a/libc/misc/preadv64.c b/libc/misc/preadv64.c
new file mode 100644
index 000000000..ea675bb35
--- /dev/null
+++ b/libc/misc/preadv64.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by VECTOR, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in VECTOR instead
+ of a contiguous buffer. */
+ssize_t
+preadv64 (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ off64_t offset;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (preadv64)
+#include <stub-tag.h>
diff --git a/libc/misc/pwritev.c b/libc/misc/pwritev.c
new file mode 100644
index 000000000..d45ed2335
--- /dev/null
+++ b/libc/misc/pwritev.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
+/* Write data pointed by the buffers described by VECTOR, which is a
+ vector of COUNT 'struct iovec's, to file descriptor FD at the given
+ position OFFSET without change the file pointer. The data is
+ written in the order specified. Operates just like 'write' (see
+ <unistd.h>) except that the data are taken from VECTOR instead of a
+ contiguous buffer. */
+ssize_t
+pwritev (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ off_t offset;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (pwritev)
+#include <stub-tag.h>
diff --git a/libc/misc/pwritev64.c b/libc/misc/pwritev64.c
new file mode 100644
index 000000000..fe9585755
--- /dev/null
+++ b/libc/misc/pwritev64.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
+/* Write data pointed by the buffers described by VECTOR, which is a
+ vector of COUNT 'struct iovec's, to file descriptor FD at the given
+ position OFFSET without change the file pointer. The data is
+ written in the order specified. Operates just like 'write' (see
+ <unistd.h>) except that the data are taken from VECTOR instead of a
+ contiguous buffer. */
+ssize_t
+pwritev64 (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ off64_t offset;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (pwritev64)
+#include <stub-tag.h>
diff --git a/libc/misc/sys/uio.h b/libc/misc/sys/uio.h
index 1b203f71c..a3c782917 100644
--- a/libc/misc/sys/uio.h
+++ b/libc/misc/sys/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996-1999,2003,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,24 +30,93 @@ __BEGIN_DECLS
/* Read data from file descriptor FD, and put the result in the
- buffers described by IOVEC, which is a vector of COUNT `struct iovec's.
+ buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
The buffers are filled in the order specified.
- Operates just like `read' (see <unistd.h>) except that data are
+ Operates just like 'read' (see <unistd.h>) except that data are
put in IOVEC instead of a contiguous buffer.
This function is a cancellation point and therefore not marked with
__THROW. */
-extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
+extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count)
+ __wur;
/* Write data pointed by the buffers described by IOVEC, which
- is a vector of COUNT `struct iovec's, to file descriptor FD.
+ is a vector of COUNT 'struct iovec's, to file descriptor FD.
The data is written in the order specified.
- Operates just like `write' (see <unistd.h>) except that the data
+ Operates just like 'write' (see <unistd.h>) except that the data
are taken from IOVEC instead of a contiguous buffer.
This function is a cancellation point and therefore not marked with
__THROW. */
-extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
+extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count)
+ __wur;
+
+
+#ifdef __USE_BSD
+# ifndef __USE_FILE_OFFSET64
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by IOVEC, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in IOVEC instead
+ of a contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count,
+ __off_t __offset) __wur;
+
+/* Write data pointed by the buffers described by IOVEC, which is a
+ vector of COUNT 'struct iovec's, to file descriptor FD at the given
+ position OFFSET without change the file pointer. The data is
+ written in the order specified. Operates just like 'write' (see
+ <unistd.h>) except that the data are taken from IOVEC instead of a
+ contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count,
+ __off_t __offset) __wur;
+# else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (preadv, (int __fd, __const struct iovec *__iovec,
+ int __count, __off_t __offset),
+ preadv64) __wur;
+extern ssize_t __REDIRECT (pwritev, (int __fd, __const struct iovec *__iovec,
+ int __count, __off_t __offset),
+ pwritev64) __wur;
+# else
+# define preadv preadv64
+# define pwritev pwritev64
+# endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by IOVEC, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in IOVEC instead
+ of a contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t preadv64 (int __fd, __const struct iovec *__iovec, int __count,
+ __off64_t __offset) __wur;
+
+/* Write data pointed by the buffers described by IOVEC, which is a
+ vector of COUNT 'struct iovec's, to file descriptor FD at the given
+ position OFFSET without change the file pointer. The data is
+ written in the order specified. Operates just like 'write' (see
+ <unistd.h>) except that the data are taken from IOVEC instead of a
+ contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t pwritev64 (int __fd, __const struct iovec *__iovec, int __count,
+ __off64_t __offset) __wur;
+# endif
+#endif /* Use BSD */
__END_DECLS
diff --git a/libc/nptl_db/ChangeLog b/libc/nptl_db/ChangeLog
index 610ca9dbb..8c07d9f32 100644
--- a/libc/nptl_db/ChangeLog
+++ b/libc/nptl_db/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-19 Roland McGrath <roland@redhat.com>
+
+ * td_symbol_list.c (DB_LOOKUP_NAME, DB_LOOKUP_NAME_TH_UNIQUE):
+ Use STRINGIFY macro in place of #argument.
+
2009-02-27 Roland McGrath <roland@redhat.com>
* td_symbol_list.c (symbol_list_arr): Move initializer guts to ...
diff --git a/libc/nptl_db/td_symbol_list.c b/libc/nptl_db/td_symbol_list.c
index 79498404c..474251d62 100644
--- a/libc/nptl_db/td_symbol_list.c
+++ b/libc/nptl_db/td_symbol_list.c
@@ -24,8 +24,8 @@
static const char *symbol_list_arr[] =
{
-# define DB_LOOKUP_NAME(idx, name) [idx] = #name,
-# define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) [idx] = #name,
+# define DB_LOOKUP_NAME(idx, name) [idx] = STRINGIFY (name),
+# define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) [idx] = STRINGIFY (name),
# include "db-symbols.h"
# undef DB_LOOKUP_NAME
# undef DB_LOOKUP_NAME_TH_UNIQUE
diff --git a/libc/po/fr.po b/libc/po/fr.po
index f01e522cc..474dff9ec 100644
--- a/libc/po/fr.po
+++ b/libc/po/fr.po
@@ -1,15 +1,15 @@
-# translation of libc-2.7.po to Français
+# translation of libc-2.9.90.fr.po to Français
# Messages français pour GNU concernant libc.
-# Copyright © 2004, 2008 Free Software Foundation, Inc.
+# Copyright © 2004, 2008, 2009 Free Software Foundation, Inc.
# This file is distributed under the same license as the glibc package.
# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
#
-# kerb <y.kerb@laposte.net>, 2008.
+# y.kerb <y.kerb@laposte.net>, 2008, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: libc-2.7\n"
-"POT-Creation-Date: 2007-10-15 21:18-0700\n"
-"PO-Revision-Date: 2008-02-26 17:33+0100\n"
+"Project-Id-Version: libc-2.9.90\n"
+"POT-Creation-Date: 2009-02-06 12:40-0800\n"
+"PO-Revision-Date: 2009-03-04 19:22+0100\n"
"Last-Translator: kerb <y.kerb@laposte.net>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -104,7 +104,7 @@ msgstr "%s%s%s : %u : %s%s Erreur imprévue : %s.\n"
msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
msgstr "%s%s%s :%u : %s%s L'assertion « %s » a échoué.\n"
-#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:97 nss/makedb.c:61
+#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
msgid "NAME"
msgstr "NOM"
@@ -136,9 +136,15 @@ msgstr ""
"-o FICHIER_DE_SORTIE [FICHIER_D_ENTRÉE]...\n"
"[FICHIER_DE_SORTIE [FICHIER_D_ENTRÉE]...]"
-#: catgets/gencat.c:232 debug/pcprofiledump.c:204 iconv/iconv_prog.c:411
-#: iconv/iconvconfig.c:380 locale/programs/localedef.c:371
-#: login/programs/pt_chown.c:88 malloc/memusagestat.c:526 nss/makedb.c:231
+#: 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
+#: 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"
@@ -146,12 +152,13 @@ msgstr ""
"Pour les instructions de rapport de bug, SVP voyez là : \n"
"<http://www.gnu.org/software/libc/bugs.html>.\n"
-#: catgets/gencat.c:246 debug/xtrace.sh:64 elf/ldconfig.c:296
-#: elf/ldd.bash.in:39 elf/sprof.c:355 iconv/iconv_prog.c:426
-#: iconv/iconvconfig.c:395 locale/programs/locale.c:275
+#: 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
+#: 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:71 nscd/nscd.c:406 nss/getent.c:83 nss/makedb.c:245
-#: posix/getconf.c:1012
+#: malloc/memusage.sh:73 malloc/memusagestat.c:551 nscd/nscd.c:429
+#: nss/getent.c:81 nss/makedb.c:245 posix/getconf.c:1012
+#: sysdeps/unix/sysv/linux/lddlibc4.c:69
#, c-format
msgid ""
"Copyright (C) %s Free Software Foundation, Inc.\n"
@@ -163,10 +170,12 @@ msgstr ""
"reproduction. AUCUNE garantie n'est donnée; tant pour des raisons\n"
"COMMERCIALES que pour RÉPONDRE À UN BESOIN PARTICULIER.\n"
-#: catgets/gencat.c:251 debug/xtrace.sh:68 elf/ldconfig.c:301 elf/sprof.c:361
-#: iconv/iconv_prog.c:431 iconv/iconvconfig.c:400 locale/programs/locale.c:280
-#: locale/programs/localedef.c:392 malloc/memusage.sh:75 nscd/nscd.c:411
-#: nss/getent.c:88 nss/makedb.c:250 posix/getconf.c:1017
+#: 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
+#: 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
#, c-format
msgid "Written by %s.\n"
msgstr "Écrit par %s.\n"
@@ -175,7 +184,7 @@ msgstr "Écrit par %s.\n"
msgid "*standard input*"
msgstr "*entrée standard*"
-#: catgets/gencat.c:288 iconv/iconv_charmap.c:158 iconv/iconv_prog.c:298
+#: catgets/gencat.c:288 iconv/iconv_charmap.c:170 iconv/iconv_prog.c:294
#: nss/makedb.c:170
#, c-format
msgid "cannot open input file `%s'"
@@ -267,17 +276,17 @@ msgstr "Affiche les informations générés par profilage PC."
msgid "[FILE]"
msgstr "[FICHIER]"
-#: debug/pcprofiledump.c:104
+#: debug/pcprofiledump.c:108
#, c-format
msgid "cannot open input file"
msgstr "ne peut ouvrir le fichier en entrée"
-#: debug/pcprofiledump.c:111
+#: debug/pcprofiledump.c:115
#, c-format
msgid "cannot read header"
msgstr "ne peut lire l'en-tête"
-#: debug/pcprofiledump.c:175
+#: debug/pcprofiledump.c:179
#, c-format
msgid "invalid pointer size"
msgstr "taille de pointeur invalide"
@@ -307,12 +316,10 @@ msgid ""
"Mandatory arguments to long options are also mandatory for any corresponding\n"
"short options.\n"
"\n"
-"For bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\\n"
msgstr ""
"Trace l'exécution du programme en imprimant la fonction en cours.\n"
"\n"
-" --data=FICHIER Ne pas lancer le programme, affiche juste les données de FICHIER.\n"
+" --data=FICHIER Ne lance pas le programme, affiche juste les données de FICHIER.\n"
"\n"
" - ?,--help Affiche cette aide et quitte\n"
" --usage Donne un court message d'usage\n"
@@ -321,23 +328,21 @@ msgstr ""
"Les arguments obligatoires pour les options de formes longues le sont aussi pour\n"
"les options de formes courtes.\n"
"\n"
-"Pour les instructions de rapport de bug, SVP voir : \n"
-"<http://www.gnu.org/software/libc/bugs.html>.\\n"
-#: debug/xtrace.sh:125
+#: debug/xtrace.sh:127
msgid "xtrace: unrecognized option \\`$1'\\n"
msgstr "xtrace : option non reconnue\\`$1'\\n"
-#: debug/xtrace.sh:138
+#: debug/xtrace.sh:140
msgid "No program name given\\n"
msgstr "Le nom de programme n'est pas indiqué\\n"
-#: debug/xtrace.sh:146
+#: debug/xtrace.sh:148
#, sh-format
msgid "executable \\`$program' not found\\n"
msgstr "exécutable \\`$program' non trouvé\\n"
-#: debug/xtrace.sh:150
+#: debug/xtrace.sh:152
#, sh-format
msgid "\\`$program' is no executable\\n"
msgstr "\\`$program' n'est pas un exécutable\\n"
@@ -358,7 +363,7 @@ msgstr "espace de nommage invalide"
msgid "invalid mode"
msgstr "mode invalide"
-#: dlfcn/dlopen.c:64
+#: dlfcn/dlopen.c:65
msgid "invalid mode parameter"
msgstr "paramètre de mode invalide"
@@ -375,7 +380,7 @@ msgstr "Système d'exploitation inconnu"
msgid ", OS ABI: %s %d.%d.%d"
msgstr ", Système d'exploitation ABI : %s %d.%d.%d"
-#: elf/cache.c:134 elf/ldconfig.c:1270
+#: elf/cache.c:134 elf/ldconfig.c:1289
#, c-format
msgid "Can't open cache file %s\n"
msgstr "Ne peut ouvrir le fichier de cache %s\n"
@@ -419,7 +424,7 @@ msgstr "Échec du changement de nom de %s vers %s"
msgid "cannot create scope list"
msgstr "ne peut créer une liste panorama"
-#: elf/dl-close.c:724
+#: elf/dl-close.c:725
msgid "shared object not open"
msgstr "objet partagé non ouvert"
@@ -492,11 +497,11 @@ msgstr "ne peut évaluer par stat() l'objet partagé"
msgid "cannot open zero fill device"
msgstr "ne peut ouvrir le fichier de périphérique rempli de zéros"
-#: elf/dl-load.c:979 elf/dl-load.c:2224
+#: elf/dl-load.c:979 elf/dl-load.c:2215
msgid "cannot create shared object descriptor"
msgstr "ne peut créer un descripteur d'objet partagé"
-#: elf/dl-load.c:998 elf/dl-load.c:1656 elf/dl-load.c:1748
+#: elf/dl-load.c:998 elf/dl-load.c:1647 elf/dl-load.c:1739
msgid "cannot read file data"
msgstr "ne peut lire les données du fichier"
@@ -560,63 +565,59 @@ msgstr "ne peut activer une pile exécutable comme l'objet partagé le requiert"
msgid "cannot close file descriptor"
msgstr "ne peut pas fermer le descripteur de fichier"
-#: elf/dl-load.c:1478
-msgid "cannot create searchlist"
-msgstr "ne peut créer une liste de recherche"
-
-#: elf/dl-load.c:1656
+#: elf/dl-load.c:1647
msgid "file too short"
msgstr "fichier trop court"
-#: elf/dl-load.c:1685
+#: elf/dl-load.c:1676
msgid "invalid ELF header"
msgstr "en-tête ELF invalide"
-#: elf/dl-load.c:1697
+#: elf/dl-load.c:1688
msgid "ELF file data encoding not big-endian"
msgstr "l'encodage des données du fichier ELF n'est pas big-endian"
-#: elf/dl-load.c:1699
+#: elf/dl-load.c:1690
msgid "ELF file data encoding not little-endian"
msgstr "l'encodage des données du fichier ELF n'est pas little-endian"
-#: elf/dl-load.c:1703
+#: elf/dl-load.c:1694
msgid "ELF file version ident does not match current one"
msgstr "l'identifiant de version du fichier ELF ne concorde pas avec la version courante"
-#: elf/dl-load.c:1707
+#: elf/dl-load.c:1698
msgid "ELF file OS ABI invalid"
msgstr "Système d'exploitation du fichier ELF ABI invalide"
-#: elf/dl-load.c:1709
+#: elf/dl-load.c:1700
msgid "ELF file ABI version invalid"
msgstr "Version du fichier ELF ABI invalide"
-#: elf/dl-load.c:1712
+#: elf/dl-load.c:1703
msgid "internal error"
msgstr "Erreur interne"
-#: elf/dl-load.c:1719
+#: elf/dl-load.c:1710
msgid "ELF file version does not match current one"
msgstr "Version du fichier ELF ne concorde pas avec la version courante"
-#: elf/dl-load.c:1727
+#: elf/dl-load.c:1718
msgid "only ET_DYN and ET_EXEC can be loaded"
msgstr "Seuls ET_DYN et ET_EXEC peuvent être chargés"
-#: elf/dl-load.c:1733
+#: elf/dl-load.c:1724
msgid "ELF file's phentsize not the expected size"
msgstr "« Phentize » du fichier ELF ne concorde pas avec la taille prévue"
-#: elf/dl-load.c:2240
+#: elf/dl-load.c:2231
msgid "wrong ELF class: ELFCLASS64"
msgstr "mauvaise classe ELF : ELFCLASS64"
-#: elf/dl-load.c:2241
+#: elf/dl-load.c:2232
msgid "wrong ELF class: ELFCLASS32"
msgstr "mauvaise classe ELF : ELFCLASS32"
-#: elf/dl-load.c:2244
+#: elf/dl-load.c:2235
msgid "cannot open shared object file"
msgstr "Ne peut ouvrir le fichier d'objet partagé"
@@ -648,11 +649,11 @@ msgstr "plus d'espace de nommage disponible pour dlmopen()"
msgid "invalid target namespace in dlmopen()"
msgstr "espace de nommage cible invalide dans dlmopen()"
-#: elf/dl-reloc.c:54
+#: elf/dl-reloc.c:121
msgid "cannot allocate memory in static TLS block"
msgstr "ne peut allouer de la mémoire dans un bloc statique TLS"
-#: elf/dl-reloc.c:196
+#: elf/dl-reloc.c:211
msgid "cannot make segment writable for relocation"
msgstr "ne peut rendre le segment inscritible pour une réaffectation"
@@ -678,11 +679,11 @@ msgstr "ne peut appliquer les protections additionnelle de mémoire après la rÃ
msgid "RTLD_NEXT used in code not dynamically loaded"
msgstr "RTLD_NEXT est utilisé dans du code qui n'est pas chargé dynamiquement"
-#: elf/dl-sysdep.c:469 elf/dl-sysdep.c:481
+#: elf/dl-sysdep.c:481 elf/dl-sysdep.c:493
msgid "cannot create capability list"
msgstr "ne peut créer une liste des possibilités"
-#: elf/dl-tls.c:825
+#: elf/dl-tls.c:864
msgid "cannot create TLS data structures"
msgstr "ne peut créer les structures de données TLS"
@@ -690,220 +691,220 @@ msgstr "ne peut créer les structures de données TLS"
msgid "cannot allocate version reference table"
msgstr "ne peut allouer la table de référence des versions"
-#: elf/ldconfig.c:138
+#: elf/ldconfig.c:141
msgid "Print cache"
msgstr "Imprimer le cache"
-#: elf/ldconfig.c:139
+#: elf/ldconfig.c:142
msgid "Generate verbose messages"
msgstr "Afficher des messages en mode verbeux"
-#: elf/ldconfig.c:140
+#: elf/ldconfig.c:143
msgid "Don't build cache"
msgstr "Ne pas construire le cache"
-#: elf/ldconfig.c:141
+#: elf/ldconfig.c:144
msgid "Don't generate links"
msgstr "Ne pas générer les liens"
-#: elf/ldconfig.c:142
+#: elf/ldconfig.c:145
msgid "Change to and use ROOT as root directory"
msgstr "Positionner dans, et utiliser le dossier racine ROOT"
-#: elf/ldconfig.c:142
+#: elf/ldconfig.c:145
msgid "ROOT"
msgstr "ROOT"
-#: elf/ldconfig.c:143
+#: elf/ldconfig.c:146
msgid "CACHE"
msgstr "CACHE"
-#: elf/ldconfig.c:143
+#: elf/ldconfig.c:146
msgid "Use CACHE as cache file"
msgstr "Utiliser CACHE comme ficher de cache"
-#: elf/ldconfig.c:144
+#: elf/ldconfig.c:147
msgid "CONF"
msgstr "CONF"
-#: elf/ldconfig.c:144
+#: elf/ldconfig.c:147
msgid "Use CONF as configuration file"
msgstr "Utiliser CONF comme fichier de configuration"
-#: elf/ldconfig.c:145
+#: elf/ldconfig.c:148
msgid "Only process directories specified on the command line. Don't build cache."
msgstr "Traiter uniquement les répertoires spécifiés sur la ligne de commande. Ne pas construire de cache."
-#: elf/ldconfig.c:146
+#: elf/ldconfig.c:149
msgid "Manually link individual libraries."
msgstr "Lier manuellement les librairies individuelles ."
-#: elf/ldconfig.c:147
+#: elf/ldconfig.c:150
msgid "FORMAT"
msgstr "FORMAT"
-#: elf/ldconfig.c:147
+#: elf/ldconfig.c:150
msgid "Format to use: new, old or compat (default)"
msgstr "Format à utiliser : nouveau, ancien ou compatible (par défaut)"
-#: elf/ldconfig.c:148
+#: elf/ldconfig.c:151
msgid "Ignore auxiliary cache file"
msgstr "Ignore le fichier cache auxiliaire"
-#: elf/ldconfig.c:156
+#: elf/ldconfig.c:159
msgid "Configure Dynamic Linker Run Time Bindings."
msgstr "Configuration dynamique des éditions de liens lors de l'exécution."
-#: elf/ldconfig.c:319
+#: elf/ldconfig.c:339
#, c-format
msgid "Path `%s' given more than once"
msgstr "Chemin « %s » donné plus d'une fois"
-#: elf/ldconfig.c:359
+#: elf/ldconfig.c:379
#, c-format
msgid "%s is not a known library type"
msgstr "%s n'est pas un type de librairie connu"
-#: elf/ldconfig.c:384
+#: elf/ldconfig.c:404
#, c-format
msgid "Can't stat %s"
msgstr "Ne peut évaluer par stat %s"
-#: elf/ldconfig.c:458
+#: elf/ldconfig.c:478
#, c-format
msgid "Can't stat %s\n"
msgstr "Ne peut évaluer par stat %s\n"
-#: elf/ldconfig.c:468
+#: elf/ldconfig.c:488
#, c-format
msgid "%s is not a symbolic link\n"
msgstr "%s n'est pas un lien symbolique\n"
-#: elf/ldconfig.c:487
+#: elf/ldconfig.c:507
#, c-format
msgid "Can't unlink %s"
msgstr "Ne peut enlever le lien (unlink) %s"
-#: elf/ldconfig.c:493
+#: elf/ldconfig.c:513
#, c-format
msgid "Can't link %s to %s"
msgstr "Ne peut établir un lien entre %s et %s"
-#: elf/ldconfig.c:499
+#: elf/ldconfig.c:519
msgid " (changed)\n"
msgstr " (a été modifié)\n"
-#: elf/ldconfig.c:501
+#: elf/ldconfig.c:521
msgid " (SKIPPED)\n"
msgstr " (ESCAMOTÉ)\n"
-#: elf/ldconfig.c:556
+#: elf/ldconfig.c:576
#, c-format
msgid "Can't find %s"
msgstr "Ne peut repérer %s"
-#: elf/ldconfig.c:572 elf/ldconfig.c:745 elf/ldconfig.c:793 elf/ldconfig.c:827
+#: elf/ldconfig.c:592 elf/ldconfig.c:765 elf/ldconfig.c:813 elf/ldconfig.c:847
#, c-format
msgid "Cannot lstat %s"
msgstr "Ne peut évaluer par lstat %s"
-#: elf/ldconfig.c:579
+#: elf/ldconfig.c:599
#, c-format
msgid "Ignored file %s since it is not a regular file."
msgstr "A ignoré le fichier %s parce que ce n'est pas un fichier régulier."
-#: elf/ldconfig.c:588
+#: elf/ldconfig.c:608
#, c-format
msgid "No link created since soname could not be found for %s"
msgstr "Aucun lien créé étant donné que n'a pas été repéré %s"
-#: elf/ldconfig.c:671
+#: elf/ldconfig.c:691
#, c-format
msgid "Can't open directory %s"
msgstr "Ne peut ouvrir le dossier %s"
-#: elf/ldconfig.c:759
+#: elf/ldconfig.c:779
#, c-format
msgid "Cannot stat %s"
msgstr "Ne peut évaluer par stat %s"
-#: elf/ldconfig.c:814 elf/readlib.c:91
+#: elf/ldconfig.c:834 elf/readlib.c:91
#, c-format
msgid "Input file %s not found.\n"
msgstr "Fichier d'entrée %s non repéré\n"
-#: elf/ldconfig.c:888
+#: elf/ldconfig.c:908
#, c-format
msgid "libc5 library %s in wrong directory"
msgstr "librairie libc5 %s est dans le mauvais dossier"
-#: elf/ldconfig.c:891
+#: elf/ldconfig.c:911
#, c-format
msgid "libc6 library %s in wrong directory"
msgstr "librairie libc6 %s est dans le mauvais dossier"
-#: elf/ldconfig.c:894
+#: elf/ldconfig.c:914
#, c-format
msgid "libc4 library %s in wrong directory"
msgstr "librairie libc4 %s est dans le mauvais dossier"
-#: elf/ldconfig.c:922
+#: elf/ldconfig.c:942
#, c-format
msgid "libraries %s and %s in directory %s have same soname but different type."
msgstr "Les librairies %s et %s du dossier %s ont le même nom mais sont de types différents."
-#: elf/ldconfig.c:1031
+#: elf/ldconfig.c:1051
#, c-format
msgid "Can't open configuration file %s"
msgstr "Ne peut ouvrir le fichier de configuration %s"
-#: elf/ldconfig.c:1095
+#: elf/ldconfig.c:1115
#, c-format
msgid "%s:%u: bad syntax in hwcap line"
msgstr "%s:%u : mauvaise syntaxe dans la ligne hwcap"
-#: elf/ldconfig.c:1101
+#: elf/ldconfig.c:1121
#, c-format
msgid "%s:%u: hwcap index %lu above maximum %u"
msgstr "%s:%u : l'index hwcap %lu dépasse le maximum %u"
-#: elf/ldconfig.c:1108 elf/ldconfig.c:1116
+#: elf/ldconfig.c:1128 elf/ldconfig.c:1136
#, c-format
msgid "%s:%u: hwcap index %lu already defined as %s"
msgstr "%s:%u : l'index hwcap %lu déjà défini comme %s"
-#: elf/ldconfig.c:1119
+#: elf/ldconfig.c:1139
#, c-format
msgid "%s:%u: duplicate hwcap %lu %s"
msgstr "%s:%u : hwcap en doublon %lu %s"
-#: elf/ldconfig.c:1141
+#: elf/ldconfig.c:1161
#, c-format
msgid "need absolute file name for configuration file when using -r"
msgstr "nécessite un nom de fichier absolu pour le fichier de configuration quand on utilise -r"
-#: elf/ldconfig.c:1148 locale/programs/xmalloc.c:70 malloc/obstack.c:434
-#: malloc/obstack.c:436 posix/getconf.c:985 posix/getconf.c:1163
+#: 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
#, c-format
msgid "memory exhausted"
msgstr "mémoire épuisée"
-#: elf/ldconfig.c:1178
+#: elf/ldconfig.c:1198
#, c-format
msgid "%s:%u: cannot read directory %s"
msgstr "%s:%u : ne peut lire le dossier %s"
-#: elf/ldconfig.c:1223
+#: elf/ldconfig.c:1242
#, c-format
msgid "relative path `%s' used to build cache"
msgstr "chemin relatif `%s' utilisé pour construire le cache"
-#: elf/ldconfig.c:1249
+#: elf/ldconfig.c:1268
#, c-format
msgid "Can't chdir to /"
msgstr "Ne peut se positionner (chdir) dans /"
-#: elf/ldconfig.c:1291
+#: elf/ldconfig.c:1310
#, c-format
msgid "Can't open cache file directory %s\n"
msgstr "Ne peut ouvrir le dossier des fichiers de cache %s\n"
@@ -921,8 +922,6 @@ msgid ""
" -r, --function-relocs process data and function relocations\n"
" -u, --unused print unused direct dependencies\n"
" -v, --verbose print all information\n"
-"For bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>."
msgstr ""
"Usage : ldd [OPTION]... FILE...\n"
" --help affiche cette aide et quitte\n"
@@ -931,49 +930,47 @@ msgstr ""
" -r, --function-relocs réaffecte les données de processus et les fonctions\n"
" -u, --unused affiche les dépendances directes non utilisées\n"
" -v, --verbose affiche toutes les informations\n"
-"Pour les instructions de rapport de bug, SVP voir : \n"
-"<http://www.gnu.org/software/libc/bugs.html>."
-#: elf/ldd.bash.in:80
+#: elf/ldd.bash.in:82
msgid "ldd: option \\`$1' is ambiguous"
msgstr "ldd : option \\`$1' est ambiguë"
-#: elf/ldd.bash.in:87
+#: elf/ldd.bash.in:89
msgid "unrecognized option"
msgstr "option non reconnue"
-#: elf/ldd.bash.in:88 elf/ldd.bash.in:126
+#: elf/ldd.bash.in:90 elf/ldd.bash.in:128
msgid "Try \\`ldd --help' for more information."
msgstr "Pour en savoir davantage, faites : \\`ldd --help'."
-#: elf/ldd.bash.in:125
+#: elf/ldd.bash.in:127
msgid "missing file arguments"
msgstr "arguments de fichier manquants"
#. TRANS No such file or directory. This is a ``file doesn't exist'' error
#. TRANS for ordinary files that are referenced in contexts where they are
#. TRANS expected to already exist.
-#: elf/ldd.bash.in:148 sysdeps/gnu/errlist.c:36
+#: elf/ldd.bash.in:150 sysdeps/gnu/errlist.c:36
msgid "No such file or directory"
msgstr "Aucun fichier ou dossier de ce type"
-#: elf/ldd.bash.in:151 inet/rcmd.c:483
+#: elf/ldd.bash.in:153 inet/rcmd.c:483
msgid "not regular file"
msgstr "n'est pas un fichier régulier"
-#: elf/ldd.bash.in:154
+#: elf/ldd.bash.in:156
msgid "warning: you do not have execution permission for"
msgstr "attention : vous n'avez pas la permission d'exécution pour"
-#: elf/ldd.bash.in:183
+#: elf/ldd.bash.in:185
msgid "\tnot a dynamic executable"
msgstr "\t n'est pas un exécutable dynamique"
-#: elf/ldd.bash.in:191
+#: elf/ldd.bash.in:193
msgid "exited with unknown exit code"
msgstr "a quitté avec un code retour inconnu"
-#: elf/ldd.bash.in:196
+#: elf/ldd.bash.in:198
msgid "error: you do not have read permission for"
msgstr "erreur : vous n'avez pas de permission de lecture pour"
@@ -1032,6 +1029,45 @@ msgstr "Erreur de la procédure mmap sur le fichier %s\n"
msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
msgstr "%s n'est pas un fichier de type ELF - il a un octet magique au début incorrect.\n"
+#: elf/sln.c:85
+#, c-format
+msgid ""
+"Usage: sln src dest|file\n"
+"\n"
+msgstr ""
+"Usage: sln src dest|file\n"
+"\n"
+
+#: elf/sln.c:110
+#, c-format
+msgid "%s: file open error: %m\n"
+msgstr "%s : erreur d'ouverture de fichier : %m\n"
+
+#: elf/sln.c:147
+#, c-format
+msgid "No target in line %d\n"
+msgstr "Pas de cible %d\n"
+
+#: elf/sln.c:179
+#, c-format
+msgid "%s: destination must not be a directory\n"
+msgstr "%s : la destination ne peut être un répertoire\n"
+
+#: elf/sln.c:185
+#, c-format
+msgid "%s: failed to remove the old destination\n"
+msgstr "%s: échec à la suppression de l'ancienne destination\n"
+
+#: elf/sln.c:193
+#, c-format
+msgid "%s: invalid destination: %s\n"
+msgstr "%s : destination invalide  %s\n"
+
+#: elf/sln.c:208 elf/sln.c:217
+#, c-format
+msgid "Invalid link from \"%s\" to \"%s\": %s\n"
+msgstr "lien invalide depuis \"%s\" jusqu'à \"%s\": %s\n"
+
#: elf/sprof.c:77
msgid "Output selection:"
msgstr "Sélection de sortie :"
@@ -1049,129 +1085,130 @@ msgid "generate call graph"
msgstr "génère un graphe des appels"
#: elf/sprof.c:89
-msgid ""
-"Read and display shared object profiling data.\vFor bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
-msgstr ""
-"Lit et affiche les données de profilage des objets partagés.\vPour les instructions de rapport de bug, SVP voir : \n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
+msgid "Read and display shared object profiling data."
+msgstr "Lit et affiche les données de profil des objets partagés."
#: elf/sprof.c:94
msgid "SHOBJ [PROFDATA]"
msgstr "SHOBJ [PROFDATA]"
-#: elf/sprof.c:400
+#: elf/sprof.c:420
#, c-format
msgid "failed to load shared object `%s'"
msgstr "échec de chargement de l'objet partagé « %s »"
-#: elf/sprof.c:409
+#: elf/sprof.c:429
#, c-format
msgid "cannot create internal descriptors"
msgstr "ne peut créer les descripteurs internes"
-#: elf/sprof.c:528
+#: elf/sprof.c:548
#, c-format
msgid "Reopening shared object `%s' failed"
msgstr "Échec de réouverture de l'objet partagé « %s »"
-#: elf/sprof.c:535 elf/sprof.c:629
+#: elf/sprof.c:555 elf/sprof.c:649
#, c-format
msgid "reading of section headers failed"
msgstr "Échec de la lecture d'en-têtes de section"
-#: elf/sprof.c:543 elf/sprof.c:637
+#: elf/sprof.c:563 elf/sprof.c:657
#, c-format
msgid "reading of section header string table failed"
msgstr "Échec de lecture de la table des chaînes d'en-têtes de section"
-#: elf/sprof.c:569
+#: elf/sprof.c:589
#, c-format
msgid "*** Cannot read debuginfo file name: %m\n"
msgstr "*** Ne peut lire le nom de fichier de debuginfo : %m\n"
-#: elf/sprof.c:589
+#: elf/sprof.c:609
#, c-format
msgid "cannot determine file name"
msgstr "Ne peut déterminer le nom de fichier"
-#: elf/sprof.c:622
+#: elf/sprof.c:642
#, c-format
msgid "reading of ELF header failed"
msgstr "Échec de lecture de l'en-tête ELF"
-#: elf/sprof.c:658
+#: elf/sprof.c:678
#, c-format
msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
msgstr "*** Le fichier « %s » a été élagué : aucune analyse détaillée possible\n"
-#: elf/sprof.c:688
+#: elf/sprof.c:708
#, c-format
msgid "failed to load symbol data"
msgstr "échec du chargement de données de symbole"
-#: elf/sprof.c:755
+#: elf/sprof.c:775
#, c-format
msgid "cannot load profiling data"
msgstr "ne peut charger les données de profilage"
-#: elf/sprof.c:764
+#: elf/sprof.c:784
#, c-format
msgid "while stat'ing profiling data file"
msgstr "lors de l'évaluation par stat() du fichier de données de profilage"
-#: elf/sprof.c:772
+#: elf/sprof.c:792
#, c-format
msgid "profiling data file `%s' does not match shared object `%s'"
msgstr "Le fichier de données de profilage « %s » ne concorde pas avec l'objet partagé « %s »"
-#: elf/sprof.c:783
+#: elf/sprof.c:803
#, c-format
msgid "failed to mmap the profiling data file"
msgstr "Échec de la procédure mmap sur le fichier de données de profilage"
-#: elf/sprof.c:791
+#: elf/sprof.c:811
#, c-format
msgid "error while closing the profiling data file"
msgstr "erreur lors de la fermeture du fichier de données de profilage"
-#: elf/sprof.c:800 elf/sprof.c:870
+#: elf/sprof.c:820 elf/sprof.c:890
#, c-format
msgid "cannot create internal descriptor"
msgstr "ne peut créer un descripteur interne"
-#: elf/sprof.c:846
+#: elf/sprof.c:866
#, c-format
msgid "`%s' is no correct profile data file for `%s'"
msgstr "« %s » est un fichier de profilage incorrect pour « %s »"
-#: elf/sprof.c:1027 elf/sprof.c:1085
+#: elf/sprof.c:1047 elf/sprof.c:1105
#, c-format
msgid "cannot allocate symbol data"
msgstr "ne peut allouer les données des symboles"
-#: iconv/iconv_charmap.c:176 iconv/iconv_prog.c:316
+#: iconv/iconv_charmap.c:142 iconv/iconv_prog.c:446
+#, c-format
+msgid "cannot open output file"
+msgstr "ne peut ouvrir le fichier de sortie"
+
+#: iconv/iconv_charmap.c:188 iconv/iconv_prog.c:312
#, c-format
msgid "error while closing input `%s'"
msgstr "erreur lors de la fermeture du fichier d'entrée « %s »"
-#: iconv/iconv_charmap.c:450
+#: iconv/iconv_charmap.c:462
#, c-format
msgid "illegal input sequence at position %Zd"
msgstr "séquence d'échappement d'entrée non permise à la position %Zd"
-#: iconv/iconv_charmap.c:469 iconv/iconv_prog.c:526
+#: iconv/iconv_charmap.c:481 iconv/iconv_prog.c:537
#, c-format
msgid "incomplete character or shift sequence at end of buffer"
msgstr "caractère ou séquence de changement incomplet à la fin du tampon"
-#: iconv/iconv_charmap.c:514 iconv/iconv_charmap.c:550 iconv/iconv_prog.c:569
-#: iconv/iconv_prog.c:605
+#: iconv/iconv_charmap.c:526 iconv/iconv_charmap.c:562 iconv/iconv_prog.c:580
+#: iconv/iconv_prog.c:616
#, c-format
msgid "error while reading the input"
msgstr "erreur lors de la lecture de l'entrée"
-#: iconv/iconv_charmap.c:532 iconv/iconv_prog.c:587
+#: iconv/iconv_charmap.c:544 iconv/iconv_prog.c:598
#, c-format
msgid "unable to allocate buffer for input"
msgstr "incapable d'allouer un tampon pour l'entrée"
@@ -1224,62 +1261,57 @@ msgstr "Convertit l'encodage des fichiers indiqués d'un encodage à l'autre."
msgid "[FILE...]"
msgstr "[FICHIER...]"
-#: iconv/iconv_prog.c:200
-#, c-format
-msgid "cannot open output file"
-msgstr "ne peut ouvrir le fichier de sortie"
-
-#: iconv/iconv_prog.c:242
+#: iconv/iconv_prog.c:234
#, c-format
msgid "conversions from `%s' and to `%s' are not supported"
msgstr "conversions de « %s » et vers « %s » ne sont pas supportées"
-#: iconv/iconv_prog.c:247
+#: iconv/iconv_prog.c:239
#, c-format
msgid "conversion from `%s' is not supported"
msgstr "conversion de « %s » n'est pas supportée"
-#: iconv/iconv_prog.c:254
+#: iconv/iconv_prog.c:246
#, c-format
msgid "conversion to `%s' is not supported"
msgstr "conversion vers « %s » n'est pas supportée"
-#: iconv/iconv_prog.c:258
+#: iconv/iconv_prog.c:250
#, c-format
msgid "conversion from `%s' to `%s' is not supported"
msgstr "conversion de « %s » vers « %s » n'est pas supportée"
-#: iconv/iconv_prog.c:268
+#: iconv/iconv_prog.c:260
#, c-format
msgid "failed to start conversion processing"
msgstr "échec de démarrage du processus de conversion"
-#: iconv/iconv_prog.c:362
+#: iconv/iconv_prog.c:358
#, c-format
msgid "error while closing output file"
msgstr "erreur lors de la fermeture du fichier de sortie"
-#: iconv/iconv_prog.c:471 iconv/iconv_prog.c:497
+#: iconv/iconv_prog.c:456
#, c-format
msgid "conversion stopped due to problem in writing the output"
msgstr "conversion stoppée en raison d'un problème d'écriture à la sortie"
-#: iconv/iconv_prog.c:522
+#: iconv/iconv_prog.c:533
#, c-format
msgid "illegal input sequence at position %ld"
msgstr "séquence d'échappement non permise à la position %ld"
-#: iconv/iconv_prog.c:530
+#: iconv/iconv_prog.c:541
#, c-format
msgid "internal error (illegal descriptor)"
msgstr "erreur interne (descripteur non permis)"
-#: iconv/iconv_prog.c:533
+#: iconv/iconv_prog.c:544
#, c-format
msgid "unknown iconv() error %d"
msgstr "erreur inconnue de iconv() %d"
-#: iconv/iconv_prog.c:779
+#: iconv/iconv_prog.c:790
msgid ""
"The following list contain all the coded character sets known. This does\n"
"not necessarily mean that all combinations of these names can be used for\n"
@@ -1515,7 +1547,7 @@ msgstr "trop d'octets pour l'encodage des caractères"
msgid "no symbolic name given for end of range"
msgstr "pas de nom symbolique fourni pour la fin de l'intervalle"
-#: locale/programs/charmap.c:610 locale/programs/ld-address.c:600
+#: 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-identification.c:452
@@ -1544,8 +1576,8 @@ msgstr "la valeur de %s doit être un entier"
msgid "%s: error in state machine"
msgstr "%s : erreur de l'automate à états finis"
-#: locale/programs/charmap.c:850 locale/programs/ld-address.c:616
-#: locale/programs/ld-collate.c:2764 locale/programs/ld-collate.c:4115
+#: 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-identification.c:468
#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348
@@ -1567,7 +1599,7 @@ msgstr "caractère inconnu « %s »"
msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"
msgstr "nombre d'octets pour une séquence d'octets de début et de fin de plage n'est pas le même : %d vs %d"
-#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3047
+#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3044
#: locale/programs/repertoire.c:419
msgid "invalid names for character range"
msgstr "nom invalide pour un intervalle de caractères"
@@ -1589,7 +1621,7 @@ msgstr "la limite supérieure de l'intervalle est plus basse que la limite infé
msgid "resulting bytes for range not representable."
msgstr "les octets résultants pour la plage ne sont pas représentables."
-#: locale/programs/ld-address.c:133 locale/programs/ld-collate.c:1556
+#: 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-measurement.c:94 locale/programs/ld-messages.c:97
#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
@@ -1599,10 +1631,10 @@ msgstr "les octets résultants pour la plage ne sont pas représentables."
msgid "No definition for %s category found"
msgstr "Pas de définition pour la catégorie %s"
-#: locale/programs/ld-address.c:144 locale/programs/ld-address.c:182
-#: locale/programs/ld-address.c:200 locale/programs/ld-address.c:229
-#: locale/programs/ld-address.c:301 locale/programs/ld-address.c:320
-#: locale/programs/ld-address.c:333 locale/programs/ld-identification.c:146
+#: locale/programs/ld-address.c:146 locale/programs/ld-address.c:184
+#: locale/programs/ld-address.c:202 locale/programs/ld-address.c:231
+#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:322
+#: locale/programs/ld-address.c:335 locale/programs/ld-identification.c:146
#: locale/programs/ld-measurement.c:105 locale/programs/ld-monetary.c:206
#: locale/programs/ld-monetary.c:250 locale/programs/ld-monetary.c:266
#: locale/programs/ld-monetary.c:278 locale/programs/ld-name.c:105
@@ -1615,46 +1647,46 @@ msgstr "Pas de définition pour la catégorie %s"
msgid "%s: field `%s' not defined"
msgstr "%s : champ « %s » n'est pas défini"
-#: locale/programs/ld-address.c:156 locale/programs/ld-address.c:208
-#: locale/programs/ld-address.c:238 locale/programs/ld-address.c:276
+#: locale/programs/ld-address.c:158 locale/programs/ld-address.c:210
+#: locale/programs/ld-address.c:240 locale/programs/ld-address.c:278
#: locale/programs/ld-name.c:117 locale/programs/ld-telephone.c:117
#, c-format
msgid "%s: field `%s' must not be empty"
msgstr "%s : champ « %s » ne peut être vide"
-#: locale/programs/ld-address.c:168
+#: locale/programs/ld-address.c:170
#, c-format
msgid "%s: invalid escape `%%%c' sequence in field `%s'"
msgstr "%s : séquence d'échappement « %%%c » invalide dans le champ « %s »"
-#: locale/programs/ld-address.c:219
+#: locale/programs/ld-address.c:221
#, c-format
msgid "%s: terminology language code `%s' not defined"
msgstr "%s : code de terminologie du langage « %s » non défini"
-#: locale/programs/ld-address.c:244
+#: locale/programs/ld-address.c:246
#, c-format
msgid "%s: field `%s' must not be defined"
msgstr "%s : champ « %s » ne doit pas être défini"
-#: locale/programs/ld-address.c:258 locale/programs/ld-address.c:287
+#: locale/programs/ld-address.c:260 locale/programs/ld-address.c:289
#, c-format
msgid "%s: language abbreviation `%s' not defined"
msgstr "%s : abréviation de la langue « %s » n'est pas définie"
-#: locale/programs/ld-address.c:265 locale/programs/ld-address.c:293
-#: locale/programs/ld-address.c:327 locale/programs/ld-address.c:339
+#: locale/programs/ld-address.c:267 locale/programs/ld-address.c:295
+#: locale/programs/ld-address.c:329 locale/programs/ld-address.c:341
#, c-format
msgid "%s: `%s' value does not match `%s' value"
msgstr "%s : valeur « %s » ne concorde pas avec la valeur « %s »"
-#: locale/programs/ld-address.c:312
+#: locale/programs/ld-address.c:314
#, c-format
msgid "%s: numeric country code `%d' not valid"
msgstr "%s : code numérique invalide pour le pays « %d »"
-#: locale/programs/ld-address.c:508 locale/programs/ld-address.c:545
-#: locale/programs/ld-address.c:583 locale/programs/ld-ctype.c:2608
+#: 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-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
@@ -1666,7 +1698,7 @@ msgstr "%s : code numérique invalide pour le pays « %d »"
msgid "%s: field `%s' declared more than once"
msgstr "%s : champ « %s » déclaré plus d'une fois"
-#: locale/programs/ld-address.c:512 locale/programs/ld-address.c:550
+#: locale/programs/ld-address.c:514 locale/programs/ld-address.c:552
#: locale/programs/ld-identification.c:368 locale/programs/ld-messages.c:311
#: locale/programs/ld-monetary.c:705 locale/programs/ld-monetary.c:740
#: locale/programs/ld-name.c:284 locale/programs/ld-numeric.c:267
@@ -1676,7 +1708,7 @@ msgstr "%s : champ « %s » déclaré plus d'une fois"
msgid "%s: unknown character in field `%s'"
msgstr "%s : caractère inconnu dans le champ « %s »"
-#: locale/programs/ld-address.c:597 locale/programs/ld-collate.c:3922
+#: 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-measurement.c:235 locale/programs/ld-messages.c:330
#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305
@@ -1686,10 +1718,10 @@ msgstr "%s : caractère inconnu dans le champ « %s »"
msgid "%s: incomplete `END' line"
msgstr "%s : ligne « END » incomplète"
-#: locale/programs/ld-address.c:607 locale/programs/ld-collate.c:542
+#: 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:4105
+#: 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-identification.c:459
@@ -1832,7 +1864,7 @@ msgstr "Pas de définition de type « UNDEFINED »"
msgid "too many errors; giving up"
msgstr "trop d'erreurs; abandon"
-#: locale/programs/ld-collate.c:2659 locale/programs/ld-collate.c:4044
+#: locale/programs/ld-collate.c:2659 locale/programs/ld-collate.c:4046
#, c-format
msgid "%s: nested conditionals not supported"
msgstr "%s : conditions imbriquées non supportées"
@@ -1852,27 +1884,27 @@ msgstr "%s : double définition de « %s »"
msgid "%s: duplicate declaration of section `%s'"
msgstr "%s : double déclaration de section « %s »"
-#: locale/programs/ld-collate.c:3027
+#: locale/programs/ld-collate.c:3024
#, c-format
msgid "%s: unknown character in collating symbol name"
msgstr "%s : caractère inconnu dans le nom du symbole de collation"
-#: locale/programs/ld-collate.c:3159
+#: locale/programs/ld-collate.c:3153
#, c-format
msgid "%s: unknown character in equivalent definition name"
msgstr "%s : caractère inconnu dans la définition équivalent d'un nom"
-#: locale/programs/ld-collate.c:3172
+#: locale/programs/ld-collate.c:3164
#, c-format
msgid "%s: unknown character in equivalent definition value"
msgstr "%s : caractère inconnu dans la définition équivalente d'une valeur"
-#: locale/programs/ld-collate.c:3182
+#: locale/programs/ld-collate.c:3174
#, c-format
msgid "%s: unknown symbol `%s' in equivalent definition"
msgstr "%s : symbole inconnu « %s » dans une définition équivalente"
-#: locale/programs/ld-collate.c:3191
+#: locale/programs/ld-collate.c:3183
msgid "error while adding equivalent collating symbol"
msgstr "Erreur lors de l'ajout d'un symbole de collation équivalent"
@@ -1952,12 +1984,12 @@ msgstr "%s : description de catégorie vide non permise"
msgid "%s: missing `reorder-sections-end' keyword"
msgstr "%s : mot clé « reorder-sections-end » manquant"
-#: locale/programs/ld-collate.c:4077
+#: locale/programs/ld-collate.c:4079
#, c-format
msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
msgstr "%s : '%s' sans correspondance 'ifdef' ou 'ifndef'"
-#: locale/programs/ld-collate.c:4095
+#: locale/programs/ld-collate.c:4097
#, c-format
msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
msgstr "%s : 'endif' sans 'ifdef' ou 'ifndef' correspondant"
@@ -2287,7 +2319,7 @@ msgstr "%s : rebut à la fin de la date finale dans la chaîne %Zd du champ «
msgid "%s: starting date is invalid in string %Zd in `era' field"
msgstr "%s : date initiale invalide dans la chaîne %Zd du champ « era »"
-#: locale/programs/ld-time.c:407
+#: locale/programs/ld-time.c:407 locale/programs/ld-time.c:435
#, c-format
msgid "%s: invalid stopping date in string %Zd in `era' field"
msgstr "%s : date finale invalide dans la chaîne %Zd du champ « era »"
@@ -2297,11 +2329,6 @@ msgstr "%s : date finale invalide dans la chaîne %Zd du champ « era »"
msgid "%s: garbage at end of stopping date in string %Zd in `era' field"
msgstr "%s : rebut à la fin de la date finale dans la chaîne %Zd du champ « era »"
-#: locale/programs/ld-time.c:435
-#, c-format
-msgid "%s: stopping date is invalid in string %Zd in `era' field"
-msgstr "%s : date finale invalide dans la chaîne %Zd du champ « era »"
-
#: locale/programs/ld-time.c:444
#, c-format
msgid "%s: missing era name in string %Zd in `era' field"
@@ -2404,14 +2431,10 @@ msgid "Print more information"
msgstr "Afficher plus informations"
#: locale/programs/locale.c:87
-msgid ""
-"Get locale-specific information.\vFor bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
-msgstr ""
-"Récupère les informations de particularisme local.\vPour les instructions de rapport de bug, SVP voir :\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
+msgid "Get locale-specific information."
+msgstr "Récupérer les particularismes locaux"
-#: locale/programs/locale.c:92
+#: locale/programs/locale.c:90
msgid ""
"NAME\n"
"[-a|-m]"
@@ -2419,27 +2442,27 @@ msgstr ""
"NOM\n"
"[-a|-m]"
-#: locale/programs/locale.c:193
+#: locale/programs/locale.c:194
#, c-format
msgid "Cannot set LC_CTYPE to default locale"
msgstr "Ne peut initialiser LC_TYPE à la locale par défaut"
-#: locale/programs/locale.c:195
+#: locale/programs/locale.c:196
#, c-format
msgid "Cannot set LC_MESSAGES to default locale"
msgstr "Ne peut initialiser LC_MESSAGES à la locale par défaut"
-#: locale/programs/locale.c:208
+#: locale/programs/locale.c:209
#, c-format
msgid "Cannot set LC_COLLATE to default locale"
msgstr "Ne peut initialiser LC_COLLATE à la locale par défaut"
-#: locale/programs/locale.c:224
+#: locale/programs/locale.c:225
#, c-format
msgid "Cannot set LC_ALL to default locale"
msgstr "Ne peut initialiser LC_ALL à la locale par défaut"
-#: locale/programs/locale.c:500
+#: locale/programs/locale.c:518
#, c-format
msgid "while preparing output"
msgstr "lors de la préparation de la sortie"
@@ -2723,8 +2746,8 @@ msgid "cannot create output file `%s' for category `%s'"
msgstr "Ne peut créer le fichier de sortie « %s » de catégorie « %s »"
#: locale/programs/locfile.c:782
-msgid "expect string argument for `copy'"
-msgstr "chaîne attendue pour l'argument de « copy »"
+msgid "expecting string argument for `copy'"
+msgstr "l'argument de chaîne attendu pour `copy'"
#: locale/programs/locfile.c:786
msgid "locale name should consist only of portable characters"
@@ -2840,8 +2863,6 @@ msgid ""
"Mandatory arguments to long options are also mandatory for any corresponding\n"
"short options.\n"
"\n"
-"For bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>."
msgstr ""
"Usage : memusage [OPTION]... PROGRAM [PROGRAMOPTION]...\n"
"Profile memory usage of PROGRAM.\n"
@@ -2851,7 +2872,7 @@ msgstr ""
" -d,--data=FILE Génère des données binaires et les stocke dans le fichier FILE\n"
" -u,--unbuffered N'utilise pas de tampon pour le fichier de sortie\n"
" -b,--buffer=SIZE Collecte les entrées au nombre de SIZE avant d'écrire en sortie\n"
-" --no-timer Ne collecte pas d'informations additionnelle par le biais du timer\n"
+" --no-timer Ne collecte pas d'informations additionnelles par le biais du timer\n"
" -m,--mmap Trace aussi \"mmap\" & apparentés\n"
"\n"
" - ?,--help Imprime cette aide et quitte\n"
@@ -2861,17 +2882,15 @@ msgstr ""
" Les options suivantes ne s'appliquent que à la génération de sortie graphique :\n"
" -t,--time-based Rend un graphe linéaire dans le temps\n"
" -T,--total Dessine aussi un graphe de l'usage de la mémoire totale\n"
-" --title=STRING Emploi STRING pour le titre du graphe\n"
+" --title=STRING Emploie STRING pour le titre du graphe\n"
" -x,--x-size=SIZE Rend le graphe en SIZE pixels de large\n"
" -y,--y-size=SIZE Rend le graphe en SIZE pixels de haut\n"
"\n"
"Les arguments obligatoires pour les options de formes longues\n"
"le sont aussi pour les options de forme courtes.\n"
"\n"
-"Pour les instructions de rapport de bug, SVP voir :\n"
-"<http://www.gnu.org/software/libc/bugs.html>."
-#: malloc/memusage.sh:99
+#: malloc/memusage.sh:101
msgid ""
"Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
" [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
@@ -2883,51 +2902,51 @@ msgstr ""
" [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
" PROGRAM [PROGRAMOPTION]..."
-#: malloc/memusage.sh:191
+#: malloc/memusage.sh:193
msgid "memusage: option \\`${1##*=}' is ambiguous"
msgstr "memusage : l'option \\`${1##*=}' est ambiguë"
-#: malloc/memusage.sh:200
+#: malloc/memusage.sh:202
msgid "memusage: unrecognized option \\`$1'"
msgstr "memusage : option non reconnue \\`$1'"
-#: malloc/memusage.sh:213
+#: malloc/memusage.sh:215
msgid "No program name given"
msgstr "Le nom de programme n'a pas été indiqué"
-#: malloc/memusagestat.c:54
+#: malloc/memusagestat.c:57
msgid "Name output file"
msgstr "Nommer le fichier de sortie"
-#: malloc/memusagestat.c:55
+#: malloc/memusagestat.c:58
msgid "Title string used in output graphic"
msgstr "Chaîne de titre utilisé dans le graphique de sortie"
-#: malloc/memusagestat.c:56
+#: malloc/memusagestat.c:59
msgid "Generate output linear to time (default is linear to number of function calls)"
msgstr "Génération de sortie linéaire au temps (par défaut linéaire au nombre d'appels de fonction)"
-#: malloc/memusagestat.c:58
+#: malloc/memusagestat.c:61
msgid "Also draw graph for total memory consumption"
msgstr "Afficher aussi le graphe de l'utilisation totale de la mémoire"
-#: malloc/memusagestat.c:59
+#: malloc/memusagestat.c:62
msgid "Make output graphic VALUE pixels wide"
msgstr "Génère un graphe ayant pour largeur VALUE pixels"
-#: malloc/memusagestat.c:60
+#: malloc/memusagestat.c:63
msgid "Make output graphic VALUE pixels high"
msgstr "Génère un graphe ayant VALUE pixels de hauteur"
-#: malloc/memusagestat.c:65
+#: malloc/memusagestat.c:68
msgid "Generate graphic from memory profiling data"
msgstr "Génération du graphique des données de profilage de la mémoire"
-#: malloc/memusagestat.c:68
+#: malloc/memusagestat.c:71
msgid "DATAFILE [OUTFILE]"
msgstr "DATAFILE [FICHIER_DE_SORTIE]"
-#: misc/error.c:118 timezone/zic.c:417
+#: misc/error.c:118
msgid "Unknown system error"
msgstr "Erreur système inconnue"
@@ -2935,7 +2954,7 @@ msgstr "Erreur système inconnue"
msgid "unable to free arguments"
msgstr "incapable de libérer des arguments"
-#: nis/nis_error.h:1 nis/ypclnt.c:822 nis/ypclnt.c:910 posix/regcomp.c:132
+#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:133
#: sysdeps/gnu/errlist.c:20
msgid "Success"
msgstr "Succès"
@@ -2977,7 +2996,7 @@ msgid "First/next chain broken"
msgstr "Bris de la chaîne Premier/Suivant"
#. TRANS Permission denied; the file permissions do not allow the attempted operation.
-#: nis/nis_error.h:11 nis/ypclnt.c:867 sysdeps/gnu/errlist.c:157
+#: nis/nis_error.h:11 nis/ypclnt.c:878 sysdeps/gnu/errlist.c:157
msgid "Permission denied"
msgstr "Permission non accordée"
@@ -3480,433 +3499,472 @@ msgstr "netname2user() : entrée LOCAL de %s dans le dossier %s n'est pas uniqu
msgid "netname2user: should not have uid 0"
msgstr "netname2user : ne devrait pas avoir le UID 0"
-#: nis/ypclnt.c:825
+#: nis/ypclnt.c:836
msgid "Request arguments bad"
msgstr "Les arguments de la requête sont invalides"
-#: nis/ypclnt.c:828
+#: nis/ypclnt.c:839
msgid "RPC failure on NIS operation"
msgstr "Échec RPC durant l'opération NIS"
-#: nis/ypclnt.c:831
+#: nis/ypclnt.c:842
msgid "Can't bind to server which serves this domain"
msgstr "Ne peut établir un lien avec le serveur qui dessert ce domaine"
-#: nis/ypclnt.c:834
+#: nis/ypclnt.c:845
msgid "No such map in server's domain"
msgstr "Cette table n'est pas dans le domaine du serveur"
-#: nis/ypclnt.c:837
+#: nis/ypclnt.c:848
msgid "No such key in map"
msgstr "Cette clé n'est pas dans la table"
-#: nis/ypclnt.c:840
+#: nis/ypclnt.c:851
msgid "Internal NIS error"
msgstr "Erreur interne de NIS"
-#: nis/ypclnt.c:843
+#: nis/ypclnt.c:854
msgid "Local resource allocation failure"
msgstr "Échec d'allocation d'une ressource de locales"
-#: nis/ypclnt.c:846
+#: nis/ypclnt.c:857
msgid "No more records in map database"
msgstr "Aucun autre enregistrement dans la table de la base de données"
-#: nis/ypclnt.c:849
+#: nis/ypclnt.c:860
msgid "Can't communicate with portmapper"
msgstr "Ne peut communiquer avec le convertisseur de ports"
-#: nis/ypclnt.c:852
+#: nis/ypclnt.c:863
msgid "Can't communicate with ypbind"
msgstr "Ne peut communiquer par ypbind"
-#: nis/ypclnt.c:855
+#: nis/ypclnt.c:866
msgid "Can't communicate with ypserv"
msgstr "Ne peut communiquer par ypserv"
-#: nis/ypclnt.c:858
+#: nis/ypclnt.c:869
msgid "Local domain name not set"
msgstr "Le nom du domaine local n'est pas initialisé"
-#: nis/ypclnt.c:861
+#: nis/ypclnt.c:872
msgid "NIS map database is bad"
msgstr "La table de la base de données NIS est erronée"
-#: nis/ypclnt.c:864
+#: nis/ypclnt.c:875
msgid "NIS client/server version mismatch - can't supply service"
msgstr "Non concordance de la version client/serveur NIS - ne peut fournir le service"
-#: nis/ypclnt.c:870
+#: nis/ypclnt.c:881
msgid "Database is busy"
msgstr "La base de données est occupée"
-#: nis/ypclnt.c:873
+#: nis/ypclnt.c:884
msgid "Unknown NIS error code"
msgstr "Code d'erreur NIS inconnu"
-#: nis/ypclnt.c:913
+#: nis/ypclnt.c:924
msgid "Internal ypbind error"
msgstr "Erreur interne de ypbind"
-#: nis/ypclnt.c:916
+#: nis/ypclnt.c:927
msgid "Domain not bound"
msgstr "Le domaine n'est pas délimité"
-#: nis/ypclnt.c:919
+#: nis/ypclnt.c:930
msgid "System resource allocation failure"
msgstr "Échec d'allocation de ressources système"
-#: nis/ypclnt.c:922
+#: nis/ypclnt.c:933
msgid "Unknown ypbind error"
msgstr "Erreur inconnue de ypbind"
-#: nis/ypclnt.c:963
+#: nis/ypclnt.c:974
msgid "yp_update: cannot convert host to netname\n"
msgstr "yp_update : ne peut convertir le nom de l'hôte à un nom réseau (netname)\n"
-#: nis/ypclnt.c:981
+#: nis/ypclnt.c:992
msgid "yp_update: cannot get server address\n"
msgstr "yp_update : ne peut obtenir l'adresse du serveur\n"
-#: nscd/aicache.c:77 nscd/hstcache.c:468
+#: nscd/aicache.c:82 nscd/hstcache.c:481
#, c-format
msgid "Haven't found \"%s\" in hosts cache!"
msgstr "N'a pas trouvé « %s » dans la cache de la liste des hôtes!"
-#: nscd/aicache.c:79 nscd/hstcache.c:470
+#: nscd/aicache.c:84 nscd/hstcache.c:483
#, c-format
msgid "Reloading \"%s\" in hosts cache!"
msgstr "Recharge \"%s\" dans le cache hôte!"
-#: nscd/cache.c:146
+#: nscd/cache.c:150
#, c-format
msgid "add new entry \"%s\" of type %s for %s to cache%s"
msgstr "ajoute une nouvelle entrée \"%s\" de type %s pour %s au cache%s"
-#: nscd/cache.c:148
+#: nscd/cache.c:152
msgid " (first)"
msgstr " (first)"
-#: nscd/cache.c:256 nscd/connections.c:810
+#: nscd/cache.c:286 nscd/connections.c:866
#, c-format
msgid "cannot stat() file `%s': %s"
msgstr "Ne peut évaluer par stat() le fichier « %s » : %s"
-#: nscd/cache.c:285
+#: nscd/cache.c:328
#, c-format
msgid "pruning %s cache; time %ld"
msgstr "écourte %s cache; time %ld"
-#: nscd/cache.c:312
+#: nscd/cache.c:357
#, c-format
msgid "considering %s entry \"%s\", timeout %<PRIu64>"
msgstr "considering %s entry \"%s\", timeout %<PRIu64>"
-#: nscd/connections.c:521 nscd/connections.c:533 nscd/connections.c:545
-#: nscd/connections.c:564
+#: nscd/connections.c:570
#, c-format
msgid "invalid persistent database file \"%s\": %s"
msgstr "fichier de base de données reste invalide \"%s\" : %s"
-#: nscd/connections.c:535
+#: nscd/connections.c:578
+msgid "uninitialized header"
+msgstr "en-tête non initialisée"
+
+#: nscd/connections.c:583
msgid "header size does not match"
msgstr "la taille de l'entête n'est pas adéquate"
-#: nscd/connections.c:547
+#: nscd/connections.c:593
msgid "file size does not match"
msgstr "la taille du fichier n'est pas adéquate"
-#: nscd/connections.c:566
+#: nscd/connections.c:610
msgid "verification failed"
msgstr "échec de la vérification"
-#: nscd/connections.c:580
+#: nscd/connections.c:624
#, c-format
msgid "suggested size of table for database %s larger than the persistent database's table"
msgstr "la taille suggérée de la table pour la base de donnée %s est plus grande que la table persistante de la base de donnée"
-#: nscd/connections.c:591 nscd/connections.c:673
+#: nscd/connections.c:635 nscd/connections.c:720
#, c-format
msgid "cannot create read-only descriptor for \"%s\"; no mmap"
msgstr "ne peut créer le descripteur read-only pour \"%s\" ; pas de mmap"
-#: nscd/connections.c:652
+#: nscd/connections.c:651
+#, c-format
+msgid "cannot access '%s'"
+msgstr "ne peut accéder '%s'"
+
+#: nscd/connections.c:699
#, c-format
msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
msgstr "la base de données %s est endommagée ou utilisée concurremment; supprimer %s manuellement au besoin et relancer"
-#: nscd/connections.c:659
+#: nscd/connections.c:706
#, c-format
msgid "cannot create %s; no persistent database used"
msgstr "ne peut créer %s; aucune base de données persistante utilisée"
-#: nscd/connections.c:662
+#: nscd/connections.c:709
#, c-format
msgid "cannot create %s; no sharing possible"
msgstr "ne peut créer %s; pas de partage possible"
-#: nscd/connections.c:733
+#: nscd/connections.c:780
#, c-format
msgid "cannot write to database file %s: %s"
msgstr "ne peut écrire dans le fichier de base de données %s : %s"
-#: nscd/connections.c:772
+#: nscd/connections.c:819
#, c-format
msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
msgstr "ne peut établir le socket comme étant fermé dans exec : %s; désactive le mode paranoïa"
-#: nscd/connections.c:823
+#: nscd/connections.c:902
#, c-format
msgid "cannot open socket: %s"
msgstr "Ne peut ouvrir le socket : « %s »"
-#: nscd/connections.c:840
+#: nscd/connections.c:922
#, c-format
msgid "cannot change socket to nonblocking mode: %s"
msgstr "ne peut établir le socket en mode nonblocking : %s"
-#: nscd/connections.c:848
+#: nscd/connections.c:930
#, c-format
msgid "cannot set socket to close on exec: %s"
msgstr "ne peut établir le socket à l'état fermé dans exec : %s"
-#: nscd/connections.c:859
+#: nscd/connections.c:943
#, c-format
msgid "cannot enable socket to accept connections: %s"
msgstr "Ne peut activer le socket pour accepter des connexions : %s"
-#: nscd/connections.c:955
+#: nscd/connections.c:1043
#, c-format
msgid "provide access to FD %d, for %s"
msgstr "fournit l'accès à FD %d, pour %s"
-#: nscd/connections.c:967
+#: nscd/connections.c:1055
#, c-format
msgid "cannot handle old request version %d; current version is %d"
msgstr "Ne peut traiter une requête d'une vieille version %d; la version courante est %d"
-#: nscd/connections.c:1009 nscd/connections.c:1062
+#: nscd/connections.c:1077
+#, c-format
+msgid "request from %ld not handled due to missing permission"
+msgstr "la requête de %ld non prise en compte du fait du manque de permission"
+
+#: nscd/connections.c:1082
+#, c-format
+msgid "request from '%s' [%ld] not handled due to missing permission"
+msgstr "la requête de '%s' [%ld] non prise en compte du fait du manque de permission"
+
+#: nscd/connections.c:1087
+msgid "request not handled due to missing permission"
+msgstr "la requête de %ld "
+
+#: nscd/connections.c:1125 nscd/connections.c:1178
#, c-format
msgid "cannot write result: %s"
msgstr "Ne peut écrire les résultats : « %s »"
-#: nscd/connections.c:1145
+#: nscd/connections.c:1261
#, c-format
msgid "error getting caller's id: %s"
msgstr "erreur lors de la récupération de l'identifiant de l'appelant : %s"
-#: nscd/connections.c:1204
+#: nscd/connections.c:1320
#, c-format
msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "ne peut ouvrir /proc/self/cmdline : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1218
+#: nscd/connections.c:1334
#, c-format
msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "ne peut lire /proc/self/cmdline : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1258
+#: nscd/connections.c:1374
#, c-format
msgid "cannot change to old UID: %s; disabling paranoia mode"
msgstr "ne peut réétablir l'ancien UID : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1268
+#: nscd/connections.c:1384
#, c-format
msgid "cannot change to old GID: %s; disabling paranoia mode"
msgstr "ne peut réétablir l'ancien GID : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1281
+#: nscd/connections.c:1397
#, c-format
msgid "cannot change to old working directory: %s; disabling paranoia mode"
msgstr "ne peut réétablir l'ancien dossier de travail : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1310
+#: nscd/connections.c:1429
#, c-format
msgid "re-exec failed: %s; disabling paranoia mode"
msgstr "re-exec a échoué : %s; désactive le mode paranoïa"
-#: nscd/connections.c:1319
+#: nscd/connections.c:1438
#, c-format
msgid "cannot change current working directory to \"/\": %s"
msgstr "ne peut établir le dossier de travail courant à \"/\" : %s"
-#: nscd/connections.c:1437
+#: nscd/connections.c:1644
#, c-format
msgid "short read while reading request: %s"
msgstr "Lecture écourtée lors de la lecture de la requête : « %s »"
-#: nscd/connections.c:1468
+#: nscd/connections.c:1677
#, c-format
msgid "key length in request too long: %d"
msgstr "La longueur de la clé de la requête est trop longue : %d"
-#: nscd/connections.c:1481
+#: nscd/connections.c:1690
#, c-format
msgid "short read while reading request key: %s"
msgstr "Lecture écourtée lors de la lecture de la clé de requête : %s"
-#: nscd/connections.c:1490
+#: nscd/connections.c:1699
#, c-format
msgid "handle_request: request received (Version = %d) from PID %ld"
msgstr "handle_request : requête reçue (Version = %d) à partir du PID %ld"
-#: nscd/connections.c:1495
+#: nscd/connections.c:1704
#, c-format
msgid "handle_request: request received (Version = %d)"
msgstr "handle_request : requête reçue (Version = %d)"
-#: nscd/connections.c:1856
+#: nscd/connections.c:1903 nscd/connections.c:2101
#, c-format
-msgid "could only start %d threads; terminating"
-msgstr "n'a pu démarrer que %d fils(threads) ; en train de s'achever"
+msgid "disabled inotify after read error %d"
+msgstr "désactive inotify après erreur de lecture %d"
+
+#: nscd/connections.c:2230
+msgid "could not initialize conditional variable"
+msgstr "n'a pu initialiser une variable conditionnelle"
-#: nscd/connections.c:1904 nscd/connections.c:1905 nscd/connections.c:1922
-#: nscd/connections.c:1931 nscd/connections.c:1949 nscd/connections.c:1960
-#: nscd/connections.c:1971
+#: nscd/connections.c:2238
+msgid "could not start clean-up thread; terminating"
+msgstr "n'a pu démarrer le process(thread) de nettoyage ; en train de s'achever"
+
+#: nscd/connections.c:2252
+msgid "could not start any worker thread; terminating"
+msgstr "n'a pas pu démarrer de process de travail (threads) ; en train de s'achever"
+
+#: 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
#, c-format
msgid "Failed to run nscd as user '%s'"
msgstr "Échec d'exécution de nscd en tant qu'usager « %s »"
-#: nscd/connections.c:1923
+#: nscd/connections.c:2322
#, c-format
msgid "initial getgrouplist failed"
msgstr "échec du getgrouplist initial"
-#: nscd/connections.c:1932
+#: nscd/connections.c:2331
#, c-format
msgid "getgrouplist failed"
msgstr "échec de getgrouplist"
-#: nscd/connections.c:1950
+#: nscd/connections.c:2349
#, c-format
msgid "setgroups failed"
msgstr "échec de setgroups"
-#: nscd/grpcache.c:402 nscd/hstcache.c:418 nscd/initgrcache.c:412
-#: nscd/pwdcache.c:397 nscd/servicescache.c:343
+#: nscd/grpcache.c:395 nscd/hstcache.c:430 nscd/initgrcache.c:416
+#: nscd/pwdcache.c:400 nscd/servicescache.c:343
#, c-format
msgid "short write in %s: %s"
msgstr "Écriture écourtée dans %s : %s"
-#: nscd/grpcache.c:445 nscd/initgrcache.c:78
+#: nscd/grpcache.c:438 nscd/initgrcache.c:78
#, c-format
msgid "Haven't found \"%s\" in group cache!"
msgstr "N'a pas trouvé « %s » dans la cache du groupe!"
-#: nscd/grpcache.c:447 nscd/initgrcache.c:80
+#: nscd/grpcache.c:440 nscd/initgrcache.c:80
#, c-format
msgid "Reloading \"%s\" in group cache!"
msgstr "Recharge \"%s\" dans le cache groupe!"
-#: nscd/grpcache.c:524
+#: nscd/grpcache.c:517
#, c-format
msgid "Invalid numeric gid \"%s\"!"
msgstr "gid numérique invalide « %s » !"
-#: nscd/mem.c:383
+#: nscd/mem.c:457
#, c-format
msgid "freed %zu bytes in %s cache"
msgstr "libéré %zu octets dans le cache %s"
-#: nscd/mem.c:512
+#: nscd/mem.c:594
#, c-format
msgid "no more memory for database '%s'"
msgstr "plus de mémoire disponible pour la base de données '%s'"
-#: nscd/nscd.c:98
+#: nscd/nscd.c:101
msgid "Read configuration data from NAME"
msgstr "Lire les données de configuration du NOM"
-#: nscd/nscd.c:100
+#: nscd/nscd.c:103
msgid "Do not fork and display messages on the current tty"
msgstr "Ne pas cloner le processus par fork() et ne pas afficher de message sur le tty courant"
-#: nscd/nscd.c:101
+#: nscd/nscd.c:104
msgid "NUMBER"
msgstr "NUMÉRO"
-#: nscd/nscd.c:101
+#: nscd/nscd.c:104
msgid "Start NUMBER threads"
msgstr "Démarrage du NOMBRE de « threads »"
-#: nscd/nscd.c:102
+#: nscd/nscd.c:105
msgid "Shut the server down"
msgstr "Arrêter le serveur"
-#: nscd/nscd.c:103
-msgid "Print current configuration statistic"
-msgstr "Afficher les statistiques de la configuration courante"
+#: nscd/nscd.c:106
+msgid "Print current configuration statistics"
+msgstr "Affiche les statistiques de la configuration courante"
-#: nscd/nscd.c:104
+#: nscd/nscd.c:107
msgid "TABLE"
msgstr "TABLE"
-#: nscd/nscd.c:105
+#: nscd/nscd.c:108
msgid "Invalidate the specified cache"
msgstr "Invalide la cache spécifiée"
-#: nscd/nscd.c:106
+#: nscd/nscd.c:109
msgid "TABLE,yes"
msgstr "TABLE,oui"
-#: nscd/nscd.c:107
+#: nscd/nscd.c:110
msgid "Use separate cache for each user"
msgstr "Utiliser une cache séparée pour chaque usager"
-#: nscd/nscd.c:112
+#: nscd/nscd.c:115
msgid "Name Service Cache Daemon."
msgstr "« Daemon » de la cache du service de noms."
-#: nscd/nscd.c:144 nss/getent.c:858 nss/makedb.c:123
+#: nscd/nscd.c:147 nss/getent.c:876 nss/makedb.c:123
#, c-format
msgid "wrong number of arguments"
msgstr "Mauvais nombre d'arguments"
-#: nscd/nscd.c:154
+#: nscd/nscd.c:157
#, c-format
msgid "failure while reading configuration file; this is fatal"
msgstr "ne peut lire le fichier de configuration; cela est fatal"
-#: nscd/nscd.c:163
+#: nscd/nscd.c:166
#, c-format
msgid "already running"
msgstr "déjà en exécution"
-#: nscd/nscd.c:178 nscd/nscd.c:233
+#: nscd/nscd.c:181 nscd/nscd.c:236
#, c-format
msgid "cannot fork"
msgstr "ne peut fourcher"
-#: nscd/nscd.c:241
+#: nscd/nscd.c:244
#, c-format
msgid "cannot change current working directory to \"/\""
msgstr "ne peut établir le dossier de travail courant à \"/\""
-#: nscd/nscd.c:249
+#: nscd/nscd.c:252
msgid "Could not create log file"
msgstr "N'a pu créé le fichier journal"
-#: nscd/nscd.c:302 nscd/nscd.c:327 nscd/nscd_stat.c:172
+#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:172
#, c-format
msgid "Only root is allowed to use this option!"
msgstr "Seul ROOT est autorisé à utiliser cette option!"
-#: nscd/nscd.c:364 nscd/nscd_stat.c:191
+#: nscd/nscd.c:345
+#, c-format
+msgid "'%s' is not a known database"
+msgstr "'%s' n'est pas une base de donnée connue"
+
+#: nscd/nscd.c:370 nscd/nscd_stat.c:191
#, c-format
msgid "write incomplete"
msgstr "écriture incomplète"
-#: nscd/nscd.c:375
+#: nscd/nscd.c:381
#, c-format
msgid "cannot read invalidate ACK"
msgstr "ne peut lire les ACK invalidés"
-#: nscd/nscd.c:381
+#: nscd/nscd.c:387
#, c-format
msgid "invalidation failed"
msgstr "l'invalidation a échoué"
-#: nscd/nscd.c:391
+#: nscd/nscd.c:397
#, c-format
msgid "secure services not implemented anymore"
msgstr "les services de sécurité ne sont plus implémentés"
@@ -3921,37 +3979,37 @@ msgstr "la base de données « %s » n'est pas supportée"
msgid "Parse error: %s"
msgstr "Erreur d'analyse syntaxique : %s"
-#: nscd/nscd_conf.c:193
+#: nscd/nscd_conf.c:194
#, c-format
msgid "Must specify user name for server-user option"
msgstr "Obligation de spécifier le nom de l'usager pour l'option serveur-usager"
-#: nscd/nscd_conf.c:200
+#: nscd/nscd_conf.c:201
#, c-format
msgid "Must specify user name for stat-user option"
msgstr "Obligation de spécifier le nom de l'usager pour l'option stat-user"
-#: nscd/nscd_conf.c:244
+#: nscd/nscd_conf.c:245
#, c-format
msgid "invalid value for 'reload-count': %u"
msgstr "valeur invalide pour 'reload-count' : %u"
-#: nscd/nscd_conf.c:259
+#: nscd/nscd_conf.c:260
#, c-format
msgid "Must specify value for restart-interval option"
msgstr "Obligation de spécifier une valeur pour l'option restart-interval (intervalle de redémarrage)"
-#: nscd/nscd_conf.c:273
+#: nscd/nscd_conf.c:274
#, c-format
msgid "Unknown option: %s %s %s"
msgstr "Option inconnue : %s %s %s"
-#: nscd/nscd_conf.c:286
+#: nscd/nscd_conf.c:287
#, c-format
msgid "cannot get current working directory: %s; disabling paranoia mode"
msgstr "ne peut obtenir le dossier de travail courant : %s; désactive le mode paranoïa"
-#: nscd/nscd_conf.c:306
+#: nscd/nscd_conf.c:307
#, c-format
msgid "maximum file size for %s database too small"
msgstr "la taille maximale de fichier pour la base de données %s est trop petite"
@@ -4082,17 +4140,17 @@ msgstr ""
"%15<PRIuMAX> allocation de mémoire à échouée\n"
"%15s vérifier /etc/%s pour les changements\n"
-#: nscd/pwdcache.c:440
+#: nscd/pwdcache.c:443
#, c-format
msgid "Haven't found \"%s\" in password cache!"
msgstr "N'a pas trouvé \"%s\" dans le cache des mots de passe!"
-#: nscd/pwdcache.c:442
+#: nscd/pwdcache.c:445
#, c-format
msgid "Reloading \"%s\" in password cache!"
msgstr "Recharge \"%s\" dans le cache des mots de passe!"
-#: nscd/pwdcache.c:520
+#: nscd/pwdcache.c:523
#, c-format
msgid "Invalid numeric uid \"%s\"!"
msgstr "uid numérique invalide « %s » !"
@@ -4168,7 +4226,11 @@ msgstr "Erreur à la récupération du contexte de nscd"
msgid "Error getting sid from context"
msgstr "erreur de récupération du sid depuis le contexte"
-#: nscd/selinux.c:399
+#: nscd/selinux.c:374
+msgid "compile-time support for database policy missing"
+msgstr "il manque le support du temps de compilation pour la politique de base de données"
+
+#: nscd/selinux.c:407
#, c-format
msgid ""
"\n"
@@ -4214,28 +4276,24 @@ msgid "Service configuration to be used"
msgstr "Configuration de service à utiliser"
#: nss/getent.c:62
-msgid ""
-"Get entries from administrative database.\vFor bug reporting instructions, please see:\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
-msgstr ""
-"Récupère les entrées depuis la base de données administrateur.\vPour les instructions de rapport de bug, SVP voir :\n"
-"<http://www.gnu.org/software/libc/bugs.html>.\n"
+msgid "Get entries from administrative database."
+msgstr "Obtient des entrées de la base de données administrative"
-#: nss/getent.c:145 nss/getent.c:394
+#: nss/getent.c:143 nss/getent.c:408
#, c-format
msgid "Enumeration not supported on %s\n"
msgstr "Énumération non supportée sur %s\n"
-#: nss/getent.c:782
+#: nss/getent.c:794
#, c-format
msgid "Unknown database name"
msgstr "Base de données inconnue"
-#: nss/getent.c:808
+#: nss/getent.c:820
msgid "Supported databases:\n"
msgstr "Base de données supportées :\n"
-#: nss/getent.c:868
+#: nss/getent.c:886
#, c-format
msgid "Unknown database: %s\n"
msgstr "Base de données inconnue : « %s »\n"
@@ -4309,151 +4367,165 @@ msgstr "Usage : %s [-v spécification] nom_de_variable [chemin_d_accès]\n"
msgid " %s -a [pathname]\n"
msgstr " %s -a [pathname]\n"
-#: posix/getconf.c:1067
+#: posix/getconf.c:1023
+#, c-format
+msgid ""
+"Usage: getconf [-v SPEC] VAR\n"
+" or: getconf [-v SPEC] PATH_VAR PATH\n"
+"\n"
+"Get the configuration value for variable VAR, or for variable PATH_VAR\n"
+"for path PATH. If SPEC is given, give values for compilation\n"
+"environment SPEC.\n"
+"\n"
+msgstr ""
+"Usage : getconf [-v SPEC] VAR\n"
+" ou : getconf [-v SPEC] PATH_VAR PATH\n"
+"\n"
+"Obtient la valeur de configuration de la variable VAR, ou la variable PATH_VAR\n"
+"avec le chemin PATH. Si SPEC est indiqué,donne les valeurs pour l'environnement\n"
+"de compilation SPEC.\n"
+"\n"
+
+#: posix/getconf.c:1081
#, c-format
msgid "unknown specification \"%s\""
msgstr "spécification inconnu « %s »"
-#: posix/getconf.c:1095
+#: posix/getconf.c:1109
#, c-format
msgid "Couldn't execute %s"
msgstr "N'a pas pu exécuter %s"
-#: posix/getconf.c:1135 posix/getconf.c:1151
+#: posix/getconf.c:1149 posix/getconf.c:1165
msgid "undefined"
msgstr "indéfini"
-#: posix/getconf.c:1173
+#: posix/getconf.c:1187
#, c-format
msgid "Unrecognized variable `%s'"
msgstr "Variable non reconnue « %s »"
-#: posix/getopt.c:571 posix/getopt.c:587
+#: posix/getopt.c:570 posix/getopt.c:586
#, c-format
msgid "%s: option '%s' is ambiguous\n"
msgstr "%s : l'option « %s » est ambiguë\n"
-#: posix/getopt.c:620 posix/getopt.c:624
+#: posix/getopt.c:619 posix/getopt.c:623
#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
msgstr "%s : l'option « --%s » ne permet pas d'argument\n"
-#: posix/getopt.c:633 posix/getopt.c:638
+#: posix/getopt.c:632 posix/getopt.c:637
#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s : l'option « %c%s » ne permet pas d'argument.\n"
+msgstr "%s : l'option « %c%s » ne permet pas d'argument\n"
-#: posix/getopt.c:681 posix/getopt.c:700 posix/getopt.c:1016
-#: posix/getopt.c:1035
+#: posix/getopt.c:680 posix/getopt.c:699 posix/getopt.c:1002
+#: posix/getopt.c:1021
#, c-format
msgid "%s: option '%s' requires an argument\n"
msgstr "%s : l'option « %s » requiert un argument\n"
-#: posix/getopt.c:738 posix/getopt.c:741
+#: posix/getopt.c:737 posix/getopt.c:740
#, c-format
msgid "%s: unrecognized option '--%s'\n"
msgstr "%s : option non reconnue « --%s »\n"
-#: posix/getopt.c:749 posix/getopt.c:752
+#: posix/getopt.c:748 posix/getopt.c:751
#, c-format
msgid "%s: unrecognized option '%c%s'\n"
msgstr "%s : option non reconnue « %c%s »\n"
-#: posix/getopt.c:804 posix/getopt.c:807
-#, c-format
-msgid "%s: illegal option -- '%c'\n"
-msgstr "%s : option non permise -- %c\n"
-
-#: posix/getopt.c:813 posix/getopt.c:816
+#: posix/getopt.c:800 posix/getopt.c:803
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s : option invalide -- %c\n"
+msgstr "%s : option invalide -- '%c'\n"
-#: posix/getopt.c:868 posix/getopt.c:884 posix/getopt.c:1088
-#: posix/getopt.c:1106
+#: posix/getopt.c:853 posix/getopt.c:870 posix/getopt.c:1073
+#: posix/getopt.c:1091
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s : l'option requiert un argument -- %c\n"
-#: posix/getopt.c:937 posix/getopt.c:953
+#: posix/getopt.c:923 posix/getopt.c:939
#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
msgstr "%s : l'option « -W %s » est ambiguë\n"
-#: posix/getopt.c:977 posix/getopt.c:995
+#: posix/getopt.c:963 posix/getopt.c:981
#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr "%s : l'option « -W %s » ne permet pas d'argument\n"
-#: posix/regcomp.c:135
+#: posix/regcomp.c:136
msgid "No match"
msgstr "Pas de concordance"
-#: posix/regcomp.c:138
+#: posix/regcomp.c:139
msgid "Invalid regular expression"
msgstr "Expression régulière invalide"
-#: posix/regcomp.c:141
+#: posix/regcomp.c:142
msgid "Invalid collation character"
msgstr "Caractère de fusionnement invalide"
-#: posix/regcomp.c:144
+#: posix/regcomp.c:145
msgid "Invalid character class name"
msgstr "Nom de classe de caractères invalide"
-#: posix/regcomp.c:147
+#: posix/regcomp.c:148
msgid "Trailing backslash"
msgstr "Barre oblique inverse en suffixe"
-#: posix/regcomp.c:150
+#: posix/regcomp.c:151
msgid "Invalid back reference"
msgstr "Référence arrière invalide"
-#: posix/regcomp.c:153
+#: posix/regcomp.c:154
msgid "Unmatched [ or [^"
msgstr "Échec du pairage de [ ou de [^"
-#: posix/regcomp.c:156
+#: posix/regcomp.c:157
msgid "Unmatched ( or \\("
msgstr "Échec du pairage de ( ou de \\("
-#: posix/regcomp.c:159
+#: posix/regcomp.c:160
msgid "Unmatched \\{"
msgstr "Échec du pairage de \\{"
-#: posix/regcomp.c:162
+#: posix/regcomp.c:163
msgid "Invalid content of \\{\\}"
msgstr "Contenu invalide de \\{\\}"
-#: posix/regcomp.c:165
+#: posix/regcomp.c:166
msgid "Invalid range end"
msgstr "Fin d'intervalle invalide"
-#: posix/regcomp.c:168
+#: posix/regcomp.c:169
msgid "Memory exhausted"
msgstr "Mémoire épuisée"
-#: posix/regcomp.c:171
+#: posix/regcomp.c:172
msgid "Invalid preceding regular expression"
msgstr "Expression régulière précédente invalide"
-#: posix/regcomp.c:174
+#: posix/regcomp.c:175
msgid "Premature end of regular expression"
msgstr "Fin prématurée de l'expression régulière"
-#: posix/regcomp.c:177
+#: posix/regcomp.c:178
msgid "Regular expression too big"
msgstr "Expression régulière trop grosse"
-#: posix/regcomp.c:180
+#: posix/regcomp.c:181
msgid "Unmatched ) or \\)"
msgstr "Échec du pairage de ) ou de \\)"
-#: posix/regcomp.c:660
+#: posix/regcomp.c:681
msgid "No previous regular expression"
msgstr "Aucune expression régulière précédente"
-#: posix/wordexp.c:1798
+#: posix/wordexp.c:1832
msgid "parameter null or not set"
msgstr "paramètre nul ou non initialisé"
@@ -4537,133 +4609,138 @@ msgstr "Signal de Temps-Réel %d"
msgid "Unknown signal %d"
msgstr "Signal inconnu %d"
-#: sunrpc/auth_unix.c:114
-msgid "authunix_create: out of memory\n"
-msgstr "authunix_create : mémoire épuisée\n"
+#: 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
+msgid "out of memory\n"
+msgstr "mémoire épuisée\n"
#: sunrpc/auth_unix.c:350
msgid "auth_unix.c: Fatal marshalling problem"
msgstr "auth_unix.c : Problème fatal de mise en ordre"
-#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139
+#: sunrpc/clnt_perr.c:105 sunrpc/clnt_perr.c:121
#, c-format
-msgid "; low version = %lu, high version = %lu"
-msgstr "; version basse = %lu, version haute = %lu"
+msgid "%s: %s; low version = %lu, high version = %lu"
+msgstr "%s : %s; version basse = %lu, version haute = %lu"
-#: sunrpc/clnt_perr.c:125
-msgid "; why = "
-msgstr "; pourquoi = "
+#: sunrpc/clnt_perr.c:112
+#, c-format
+msgid "%s: %s; why = %s\n"
+msgstr "%s : %s; pourquoi = %s\n"
-#: sunrpc/clnt_perr.c:132
+#: sunrpc/clnt_perr.c:114
#, c-format
-msgid "(unknown authentication error - %d)"
-msgstr "(erreur inconnue d'authentification - %d)"
+msgid "%s: %s; why = (unknown authentication error - %d)\n"
+msgstr "%s : %s; pourquoi = (erreur inconnue d'authentification - %d)\n"
-#: sunrpc/clnt_perr.c:172
+#: sunrpc/clnt_perr.c:159
msgid "RPC: Success"
msgstr "RPC : succès"
-#: sunrpc/clnt_perr.c:175
+#: sunrpc/clnt_perr.c:162
msgid "RPC: Can't encode arguments"
msgstr "RPC : ne peut encoder les arguments"
-#: sunrpc/clnt_perr.c:179
+#: sunrpc/clnt_perr.c:166
msgid "RPC: Can't decode result"
msgstr "RPC : ne peut décoder le résultat"
-#: sunrpc/clnt_perr.c:183
+#: sunrpc/clnt_perr.c:170
msgid "RPC: Unable to send"
msgstr "RPC : incapable d'effectuer la transmission"
-#: sunrpc/clnt_perr.c:187
+#: sunrpc/clnt_perr.c:174
msgid "RPC: Unable to receive"
msgstr "RPC : incapable d'effectuer la réception"
-#: sunrpc/clnt_perr.c:191
+#: sunrpc/clnt_perr.c:178
msgid "RPC: Timed out"
msgstr "RPC : expiration du délai de la minuterie"
-#: sunrpc/clnt_perr.c:195
+#: sunrpc/clnt_perr.c:182
msgid "RPC: Incompatible versions of RPC"
msgstr "RPC : versions incompatibles de RPC"
-#: sunrpc/clnt_perr.c:199
+#: sunrpc/clnt_perr.c:186
msgid "RPC: Authentication error"
msgstr "RPC : erreur d'authentification"
-#: sunrpc/clnt_perr.c:203
+#: sunrpc/clnt_perr.c:190
msgid "RPC: Program unavailable"
msgstr "RPC : le programme n'est pas disponible"
-#: sunrpc/clnt_perr.c:207
+#: sunrpc/clnt_perr.c:194
msgid "RPC: Program/version mismatch"
msgstr "RPC : non concordance de programme ou de version"
-#: sunrpc/clnt_perr.c:211
+#: sunrpc/clnt_perr.c:198
msgid "RPC: Procedure unavailable"
msgstr "RPC : la procédure n'est pas disponible"
-#: sunrpc/clnt_perr.c:215
+#: sunrpc/clnt_perr.c:202
msgid "RPC: Server can't decode arguments"
msgstr "RPC : le serveur ne peut décoder les arguments"
-#: sunrpc/clnt_perr.c:219
+#: sunrpc/clnt_perr.c:206
msgid "RPC: Remote system error"
msgstr "RPC : erreur système sur l'hôte cible"
-#: sunrpc/clnt_perr.c:223
+#: sunrpc/clnt_perr.c:210
msgid "RPC: Unknown host"
msgstr "RPC : hôte inconnu"
-#: sunrpc/clnt_perr.c:227
+#: sunrpc/clnt_perr.c:214
msgid "RPC: Unknown protocol"
msgstr "RPC : protocole inconnu"
-#: sunrpc/clnt_perr.c:231
+#: sunrpc/clnt_perr.c:218
msgid "RPC: Port mapper failure"
msgstr "RPC : échec de conversion de ports"
-#: sunrpc/clnt_perr.c:235
+#: sunrpc/clnt_perr.c:222
msgid "RPC: Program not registered"
msgstr "RPC : le programme n'est pas enregistré"
-#: sunrpc/clnt_perr.c:239
+#: sunrpc/clnt_perr.c:226
msgid "RPC: Failed (unspecified error)"
msgstr "RPC : échec (erreur non spécifiée)"
-#: sunrpc/clnt_perr.c:280
+#: sunrpc/clnt_perr.c:267
msgid "RPC: (unknown error code)"
msgstr "RPC : (code d'erreur inconnu)"
-#: sunrpc/clnt_perr.c:342
+#: sunrpc/clnt_perr.c:330
msgid "Authentication OK"
msgstr "Succès d'authentification"
-#: sunrpc/clnt_perr.c:345
+#: sunrpc/clnt_perr.c:333
msgid "Invalid client credential"
msgstr "Identité du client invalide"
-#: sunrpc/clnt_perr.c:349
+#: sunrpc/clnt_perr.c:337
msgid "Server rejected credential"
msgstr "Le serveur a rejeté l'identité"
-#: sunrpc/clnt_perr.c:353
+#: sunrpc/clnt_perr.c:341
msgid "Invalid client verifier"
msgstr "Vérificateur du client invalide"
-#: sunrpc/clnt_perr.c:357
+#: sunrpc/clnt_perr.c:345
msgid "Server rejected verifier"
msgstr "Le server a rejeté la vérification"
-#: sunrpc/clnt_perr.c:361
+#: sunrpc/clnt_perr.c:349
msgid "Client credential too weak"
msgstr "Identité du client peu fiable"
-#: sunrpc/clnt_perr.c:365
+#: sunrpc/clnt_perr.c:353
msgid "Invalid server verifier"
msgstr "Vérificateur du serveur invalide"
-#: sunrpc/clnt_perr.c:369
+#: sunrpc/clnt_perr.c:357
msgid "Failed (unspecified error)"
msgstr "Échec (erreur non spécifiée)"
@@ -4671,18 +4748,6 @@ msgstr "Échec (erreur non spécifiée)"
msgid "clnt_raw.c: fatal header serialization error"
msgstr "clnt_raw.c : Erreur fatale de sérialisation d'en-tête"
-#: sunrpc/clnt_tcp.c:131
-msgid "clnttcp_create: out of memory\n"
-msgstr "clnttcp_create : mémoire épuisée\n"
-
-#: sunrpc/clnt_udp.c:139
-msgid "clntudp_create: out of memory\n"
-msgstr "clntudp_create : mémoire épuisée\n"
-
-#: sunrpc/clnt_unix.c:128
-msgid "clntunix_create: out of memory\n"
-msgstr "clntunix_create : mémoire épuisée\n"
-
#: sunrpc/pm_getmaps.c:83
msgid "pmap_getmaps.c: rpc problem"
msgstr "pmap_getmaps.c : problème RPC"
@@ -4711,119 +4776,242 @@ msgstr "Problème de scrutation lors de la diffusion"
msgid "Cannot receive reply to broadcast"
msgstr "Ne peut recevoir l'accusé réception à la requête faite par diffusion"
-#: sunrpc/rpc_main.c:286
+#: sunrpc/rpc_main.c:290
#, c-format
msgid "%s: output would overwrite %s\n"
msgstr "%s : la sortie écraserait %s\n"
-#: sunrpc/rpc_main.c:293
+#: sunrpc/rpc_main.c:297
#, c-format
msgid "%s: unable to open %s: %m\n"
msgstr "%s : incapable d'ouvrir %s : %m\n"
-#: sunrpc/rpc_main.c:305
+#: sunrpc/rpc_main.c:309
#, c-format
msgid "%s: while writing output %s: %m"
msgstr "%s : lors de l'écriture sur la sortie %s : %m"
-#: sunrpc/rpc_main.c:340
+#: sunrpc/rpc_main.c:344
#, c-format
msgid "cannot find C preprocessor: %s \n"
msgstr "Ne peut trouver le préprocesseur C : %s\n"
-#: sunrpc/rpc_main.c:348
+#: sunrpc/rpc_main.c:352
msgid "cannot find any C preprocessor (cpp)\n"
msgstr "Ne peut trouver un préprocesseur C (cpp)\n"
-#: sunrpc/rpc_main.c:417
+#: sunrpc/rpc_main.c:421
#, c-format
msgid "%s: C preprocessor failed with signal %d\n"
msgstr "%s : échec du préprocesseur C -- code de terminaison : %d\n"
-#: sunrpc/rpc_main.c:420
+#: sunrpc/rpc_main.c:424
#, c-format
msgid "%s: C preprocessor failed with exit code %d\n"
msgstr "%s : échec du préprocesseur C -- code de terminaison : %d\n"
-#: sunrpc/rpc_main.c:460
+#: sunrpc/rpc_main.c:464
#, c-format
msgid "illegal nettype: `%s'\n"
msgstr "« nettype » non permis :« %s »\n"
-#: sunrpc/rpc_main.c:1122
+#: sunrpc/rpc_main.c:1130
#, c-format
msgid "rpcgen: too many defines\n"
msgstr "rpcgen : trop de définitions\n"
-#: sunrpc/rpc_main.c:1134
+#: sunrpc/rpc_main.c:1142
#, c-format
msgid "rpcgen: arglist coding error\n"
msgstr "rpcgen : erreur dans la liste d'arguments de codage\n"
#. TRANS: the file will not be removed; this is an
#. TRANS: informative message.
-#: sunrpc/rpc_main.c:1167
+#: sunrpc/rpc_main.c:1175
#, c-format
msgid "file `%s' already exists and may be overwritten\n"
msgstr "Le fichier « %s » existe déjà et peut avoir été écrasé.\n"
-#: sunrpc/rpc_main.c:1212
+#: sunrpc/rpc_main.c:1220
#, c-format
msgid "Cannot specify more than one input file!\n"
msgstr "Ne peut spécifier plus d'un fichier d'entrée!\n"
-#: sunrpc/rpc_main.c:1382
+#: sunrpc/rpc_main.c:1394
+#, c-format
msgid "This implementation doesn't support newstyle or MT-safe code!\n"
msgstr "Cette implantation ne supporte pas le nouveau style ou le code MT-safe!\n"
-#: sunrpc/rpc_main.c:1391
+#: sunrpc/rpc_main.c:1403
#, c-format
msgid "Cannot use netid flag with inetd flag!\n"
msgstr "Ne utiliser le sémaphore « netid » avec le sémaphore « inetd » !\n"
-#: sunrpc/rpc_main.c:1403
+#: sunrpc/rpc_main.c:1415
+#, c-format
msgid "Cannot use netid flag without TIRPC!\n"
msgstr "Ne peut utiliser le sémaphore « netid » sans « TIRPC » !\n"
-#: sunrpc/rpc_main.c:1410
+#: sunrpc/rpc_main.c:1422
+#, c-format
msgid "Cannot use table flags with newstyle!\n"
msgstr "Ne peut utiliser la table des sémaphores avec « newstyle » !\n"
-#: sunrpc/rpc_main.c:1429
+#: sunrpc/rpc_main.c:1441
#, c-format
msgid "\"infile\" is required for template generation flags.\n"
msgstr "\"fichier_d_entrée\" est requis pour la génération du gabarit des indicateurs.\n"
-#: sunrpc/rpc_main.c:1434
+#: sunrpc/rpc_main.c:1446
#, c-format
msgid "Cannot have more than one file generation flag!\n"
msgstr "Ne peut avoir plus d'un fichier de génération de sémaphores!\n"
-#: sunrpc/rpc_main.c:1443
+#: sunrpc/rpc_main.c:1455
#, c-format
msgid "usage: %s infile\n"
msgstr "usage : %s fichier_d_entrée\n"
-#: sunrpc/rpc_main.c:1444
+#: sunrpc/rpc_main.c:1456
#, c-format
msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
msgstr "\t%s [-abkCLNTM][-Dname[=valeur]] [-i taille] [-I [-K secondes]] [-Y chemin] fichier\n"
-#: sunrpc/rpc_main.c:1446
+#: sunrpc/rpc_main.c:1458
#, 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 fichier_de_sortie] [fichier_d_entrée]\n"
-#: sunrpc/rpc_main.c:1448
+#: sunrpc/rpc_main.c:1460
#, c-format
msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
msgstr "\t%s [-s type_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n"
-#: sunrpc/rpc_main.c:1449
+#: sunrpc/rpc_main.c:1461
#, c-format
msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
msgstr "\t%s [-n id_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n"
+#: sunrpc/rpc_main.c:1469
+#, c-format
+msgid "options:\n"
+msgstr "options :\n"
+
+#: sunrpc/rpc_main.c:1470
+#, c-format
+msgid "-a\t\tgenerate all files, including samples\n"
+msgstr "-a\t\tgénère tout fichiers, y compris exemples\n"
+
+#: sunrpc/rpc_main.c:1471
+#, c-format
+msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
+msgstr "-b\t\tmode de compatibilité descendante (génère du code pour Sun0S 4.1)\n"
+
+#: sunrpc/rpc_main.c:1472
+#, c-format
+msgid "-c\t\tgenerate XDR routines\n"
+msgstr "-c\t\tgénère des routines XDR\n"
+
+#: sunrpc/rpc_main.c:1473
+#, c-format
+msgid "-C\t\tANSI C mode\n"
+msgstr "-C\t\tmode ANSI C\n"
+
+#: sunrpc/rpc_main.c:1474
+#, c-format
+msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
+msgstr "-Dname[=valeur]\tdéfinit un symbole (pareil que #define)\n"
+
+#: sunrpc/rpc_main.c:1475
+#, c-format
+msgid "-h\t\tgenerate header file\n"
+msgstr "-h\t\tgénère le fichier d'entête\n"
+
+#: sunrpc/rpc_main.c:1476
+#, c-format
+msgid "-i size\t\tsize at which to start generating inline code\n"
+msgstr "-i size\t\ttaille à laquelle débute la génération du code en ligne\n"
+
+#: sunrpc/rpc_main.c:1477
+#, c-format
+msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
+msgstr "-I\t\tgénère du code pour le support de inetd sur serveur (pour SunOS 4.1)\n"
+
+#: sunrpc/rpc_main.c:1478
+#, c-format
+msgid "-K seconds\tserver exits after K seconds of inactivity\n"
+msgstr "-K secondes\tserveur quitte après K secondes d'inactivité\n"
+
+#: sunrpc/rpc_main.c:1479
+#, c-format
+msgid "-l\t\tgenerate client side stubs\n"
+msgstr "-l\t\tgénère des squelettes de code du côté client\n"
+
+#: sunrpc/rpc_main.c:1480
+#, c-format
+msgid "-L\t\tserver errors will be printed to syslog\n"
+msgstr "-L\t\tles erreurs du serveur seront dirigées vers syslog\n"
+
+#: sunrpc/rpc_main.c:1481
+#, c-format
+msgid "-m\t\tgenerate server side stubs\n"
+msgstr "-m\t\tgénère des squelettes de code du côté serveur\n"
+
+#: sunrpc/rpc_main.c:1482
+#, c-format
+msgid "-M\t\tgenerate MT-safe code\n"
+msgstr "-M\t\tgénère le code MT-safe\n"
+
+#: sunrpc/rpc_main.c:1483
+#, c-format
+msgid "-n netid\tgenerate server code that supports named netid\n"
+msgstr "-n netid\tgénère le code serveur qui supporte netid nommé\n"
+
+#: sunrpc/rpc_main.c:1484
+#, c-format
+msgid "-N\t\tsupports multiple arguments and call-by-value\n"
+msgstr "-N\t\tsupporte des arguments multiples et call-by-value\n"
+
+#: sunrpc/rpc_main.c:1485
+#, c-format
+msgid "-o outfile\tname of the output file\n"
+msgstr "-o outfile\tnom du fichier de sortie\n"
+
+#: sunrpc/rpc_main.c:1486
+#, c-format
+msgid "-s nettype\tgenerate server code that supports named nettype\n"
+msgstr "-s nettype\tgénère le code serveur qui supporte nettype nommé\n"
+
+#: sunrpc/rpc_main.c:1487
+#, c-format
+msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
+msgstr "-Sc\t\tgénère du code échantillon client qui utilise des procédures éloignées\n"
+
+#: sunrpc/rpc_main.c:1488
+#, c-format
+msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
+msgstr "-Ss\t\tgénère du code échantillon serveur qui définit des procédures éloignées\n"
+
+#: sunrpc/rpc_main.c:1489
+#, c-format
+msgid "-Sm \t\tgenerate makefile template \n"
+msgstr "-Sm \t\tgénère un patron de makefile\n"
+
+#: sunrpc/rpc_main.c:1490
+#, c-format
+msgid "-t\t\tgenerate RPC dispatch table\n"
+msgstr "-t\t\tgénère la table de distribution RPC\n"
+
+#: sunrpc/rpc_main.c:1491
+#, c-format
+msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
+msgstr "-T\t\tgénère le code qui supporte les tables de distribution RPC\n"
+
+#: sunrpc/rpc_main.c:1492
+#, c-format
+msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
+msgstr "-Y path\t\tnom de répertoire pour trouver un préprocesseur C (cpp)\n"
+
#: sunrpc/rpc_scan.c:114
msgid "constant or identifier expected"
msgstr "Constante ou identificateur attendu"
@@ -4844,79 +5032,79 @@ msgstr "Chaîne vide de caractères"
msgid "preprocessor error"
msgstr "Erreur du préprocesseur"
-#: sunrpc/rpcinfo.c:237 sunrpc/rpcinfo.c:383
+#: sunrpc/rpcinfo.c:254 sunrpc/rpcinfo.c:400
#, c-format
msgid "program %lu is not available\n"
msgstr "Le programme %lu n'est pas disponible.\n"
-#: sunrpc/rpcinfo.c:264 sunrpc/rpcinfo.c:310 sunrpc/rpcinfo.c:333
-#: sunrpc/rpcinfo.c:407 sunrpc/rpcinfo.c:453 sunrpc/rpcinfo.c:476
-#: sunrpc/rpcinfo.c:510
+#: 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
#, c-format
msgid "program %lu version %lu is not available\n"
msgstr "Le programme %lu de version %lu n'est pas disponible.\n"
-#: sunrpc/rpcinfo.c:515
+#: sunrpc/rpcinfo.c:532
#, c-format
msgid "program %lu version %lu ready and waiting\n"
msgstr "Le programme %lu de version %lu est prêt et en attente.\n"
-#: sunrpc/rpcinfo.c:556 sunrpc/rpcinfo.c:563
+#: sunrpc/rpcinfo.c:573 sunrpc/rpcinfo.c:580
msgid "rpcinfo: can't contact portmapper"
msgstr "rpcinfo : ne peut contacter l'aiguilleur de ports"
-#: sunrpc/rpcinfo.c:570
+#: sunrpc/rpcinfo.c:587
msgid "No remote programs registered.\n"
msgstr "Aucun programme enregistré sur l'hôte cible\n"
-#: sunrpc/rpcinfo.c:574
+#: sunrpc/rpcinfo.c:591
msgid " program vers proto port\n"
msgstr " program no_version protocole no_port\n"
-#: sunrpc/rpcinfo.c:613
+#: sunrpc/rpcinfo.c:630
msgid "(unknown)"
msgstr "(inconnu)"
-#: sunrpc/rpcinfo.c:637
+#: sunrpc/rpcinfo.c:654
#, c-format
msgid "rpcinfo: broadcast failed: %s\n"
msgstr "rpcinfo : échec de diffusion : %s\n"
-#: sunrpc/rpcinfo.c:658
+#: sunrpc/rpcinfo.c:675
msgid "Sorry. You are not root\n"
msgstr "Désolé. Vous n'êtes pas ROOT\n"
-#: sunrpc/rpcinfo.c:665
+#: sunrpc/rpcinfo.c:682
#, c-format
msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
msgstr "rpcinfo : ne peut éliminer l'enregistrement du programme %s de version %s\n"
-#: sunrpc/rpcinfo.c:674
+#: sunrpc/rpcinfo.c:691
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
msgstr "Usage : rpcinfo [ -n no_port ] -u hôte no_prog [ no_version ]\n"
-#: sunrpc/rpcinfo.c:676
+#: sunrpc/rpcinfo.c:693
msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
msgstr " rpcinfo [ -n no_de_port ] -t hôte no_program [ no_version ]\n"
-#: sunrpc/rpcinfo.c:678
+#: sunrpc/rpcinfo.c:695
msgid " rpcinfo -p [ host ]\n"
msgstr " rpcinfo -p [ hôte ]\n"
-#: sunrpc/rpcinfo.c:679
+#: sunrpc/rpcinfo.c:696
msgid " rpcinfo -b prognum versnum\n"
msgstr " rpcinfo -b no_program no_version\n"
-#: sunrpc/rpcinfo.c:680
+#: sunrpc/rpcinfo.c:697
msgid " rpcinfo -d prognum versnum\n"
msgstr " rpcinfo -d no_program no_version\n"
-#: sunrpc/rpcinfo.c:695
+#: sunrpc/rpcinfo.c:722
#, c-format
msgid "rpcinfo: %s is unknown service\n"
msgstr "rpcinfo : %s est un service inconnu\n"
-#: sunrpc/rpcinfo.c:732
+#: sunrpc/rpcinfo.c:759
#, c-format
msgid "rpcinfo: %s is unknown host\n"
msgstr "rpcinfo : %s est un hôte inconnu\n"
@@ -4965,14 +5153,6 @@ msgstr "svc_tcp.c - problème de création d'un socket TCP"
msgid "svc_tcp.c - cannot getsockname or listen"
msgstr "svc_tcp.c - ne peut repérer le nom du socket par getsockname() ou listen()"
-#: sunrpc/svc_tcp.c:179
-msgid "svctcp_create: out of memory\n"
-msgstr "svctcp_create : mémoire épuisée\n"
-
-#: sunrpc/svc_tcp.c:218
-msgid "svc_tcp: makefd_xprt: out of memory\n"
-msgstr "svc_tcp : makefd_xprt : mémoire épuisée\n"
-
#: sunrpc/svc_udp.c:128
msgid "svcudp_create: socket creation problem"
msgstr "svcudp_create : problème de création du socket"
@@ -4981,39 +5161,35 @@ msgstr "svcudp_create : problème de création du socket"
msgid "svcudp_create - cannot getsockname"
msgstr "svcudp_create - ne peut repérer le nom du socket par getsockname()"
-#: sunrpc/svc_udp.c:152
-msgid "svcudp_create: out of memory\n"
-msgstr "svctcp_create : mémoire épuisée\n"
-
-#: sunrpc/svc_udp.c:174
+#: sunrpc/svc_udp.c:175
msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
msgstr "svcudp_create : xp_pad est trop petit pour IP_PKTINFO\n"
-#: sunrpc/svc_udp.c:474
+#: sunrpc/svc_udp.c:475
msgid "enablecache: cache already enabled"
msgstr "enablecache : cache déjà activée"
-#: sunrpc/svc_udp.c:480
+#: sunrpc/svc_udp.c:481
msgid "enablecache: could not allocate cache"
msgstr "enablecache : ne peut allouer une cache"
-#: sunrpc/svc_udp.c:489
+#: sunrpc/svc_udp.c:490
msgid "enablecache: could not allocate cache data"
msgstr "enablecache : ne peut allouer une cache de données"
-#: sunrpc/svc_udp.c:497
+#: sunrpc/svc_udp.c:498
msgid "enablecache: could not allocate cache fifo"
msgstr "enablecache : ne peut allouer une cache de type fifo"
-#: sunrpc/svc_udp.c:532
+#: sunrpc/svc_udp.c:533
msgid "cache_set: victim not found"
msgstr "cache_set : « victim » non repéré"
-#: sunrpc/svc_udp.c:543
+#: sunrpc/svc_udp.c:544
msgid "cache_set: victim alloc failed"
msgstr "cache_set : échec d'allocation de « victim »"
-#: sunrpc/svc_udp.c:550
+#: sunrpc/svc_udp.c:551
msgid "cache_set: could not allocate new rpc_buffer"
msgstr "cache_set : ne peut allouer une nouveau tampon rpc_buffer"
@@ -5025,34 +5201,6 @@ msgstr "svc_unix.c - problème de création d'un socket « AF_UNIX »"
msgid "svc_unix.c - cannot getsockname or listen"
msgstr "svc_unix.c - ne peut repérer le nom du socket par getsockname() ou listen()"
-#: sunrpc/svc_unix.c:176
-msgid "svcunix_create: out of memory\n"
-msgstr "svcunix_create : mémoire épuisée\n"
-
-#: sunrpc/svc_unix.c:215
-msgid "svc_unix: makefd_xprt: out of memory\n"
-msgstr "svc_unix : makefd_xprt : mémoire épuisée\n"
-
-#: sunrpc/xdr.c:566
-msgid "xdr_bytes: out of memory\n"
-msgstr "xdr_bytes : mémoire épuisée\n"
-
-#: sunrpc/xdr.c:718
-msgid "xdr_string: out of memory\n"
-msgstr "xdr_string : mémoire épuisée\n"
-
-#: sunrpc/xdr_array.c:106
-msgid "xdr_array: out of memory\n"
-msgstr "xdr_array : mémoire épuisée\n"
-
-#: sunrpc/xdr_rec.c:156
-msgid "xdrrec_create: out of memory\n"
-msgstr "xdrrec_create : mémoire épuisée\n"
-
-#: sunrpc/xdr_ref.c:86
-msgid "xdr_reference: out of memory\n"
-msgstr "xdr_reference : mémoire épuisée\n"
-
#: sysdeps/generic/siglist.h:29 sysdeps/unix/siglist.c:27
msgid "Hangup"
msgstr "Fin de la connexion (raccroché)"
@@ -6114,76 +6262,85 @@ msgstr "%s est pour une machine inconnue %d.\n"
msgid "makecontext: does not know how to handle more than 8 arguments\n"
msgstr "makecontext : ne sait pas comment traiter plus de 8 arguments\n"
-#: sysdeps/unix/sysv/linux/lddlibc4.c:64
+#: sysdeps/unix/sysv/linux/lddlibc4.c:61
+#, c-format
+msgid ""
+"Usage: lddlibc4 FILE\n"
+"\n"
+msgstr ""
+"Usage : lddlibc4 FILE\n"
+"\n"
+
+#: sysdeps/unix/sysv/linux/lddlibc4.c:82
#, c-format
msgid "cannot open `%s'"
msgstr "Ne peut ouvrir « %s »"
-#: sysdeps/unix/sysv/linux/lddlibc4.c:68
+#: sysdeps/unix/sysv/linux/lddlibc4.c:86
#, c-format
msgid "cannot read header from `%s'"
msgstr "Ne peut lire l'en-tête de « %s »"
-#: timezone/zdump.c:211
+#: timezone/zdump.c:210
msgid "lacks alphabetic at start"
msgstr "Il manque un lettre de l'alphabet au début"
-#: timezone/zdump.c:213
+#: timezone/zdump.c:212
msgid "has fewer than 3 alphabetics"
msgstr "a moins de 3 lettres alphabétiques"
-#: timezone/zdump.c:215
+#: timezone/zdump.c:214
msgid "has more than 6 alphabetics"
msgstr "a plus de 6 lettres alphabétiques"
-#: timezone/zdump.c:223
+#: timezone/zdump.c:222
msgid "differs from POSIX standard"
msgstr "diffère du standard POSIX"
-#: timezone/zdump.c:229
+#: timezone/zdump.c:228
#, c-format
msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
msgstr "%s : attention : zone \"%s\" abréviation \"%s\" %s\n"
-#: timezone/zdump.c:280
+#: timezone/zdump.c:279
#, c-format
msgid "%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
msgstr "%s : usage est %s [ --version ] [ -v ] [ -c [AnnéeBasse,]AnnéeHaute ] nom_du_fuseau_horaire ...\n"
-#: timezone/zdump.c:297
+#: timezone/zdump.c:296
#, c-format
msgid "%s: wild -c argument %s\n"
msgstr "%s : argument -c intempestif %s\n"
-#: timezone/zdump.c:388
+#: timezone/zdump.c:387
msgid "Error writing to standard output"
msgstr "Erreur d'écriture sur la sortie standard"
-#: timezone/zdump.c:411
+#: timezone/zdump.c:410
#, c-format
msgid "%s: use of -v on system with floating time_t other than float or double\n"
msgstr "%s : usage de -v sur un système avec time_t flottant autre que float ou double\n"
-#: timezone/zic.c:392
+#: timezone/zic.c:388
#, c-format
msgid "%s: Memory exhausted: %s\n"
msgstr "%s : mémoire épuisée : %s\n"
-#: timezone/zic.c:451
+#: timezone/zic.c:434
#, c-format
msgid "\"%s\", line %d: %s"
msgstr "« %s », ligne %d : %s"
-#: timezone/zic.c:454
+#: timezone/zic.c:437
#, c-format
msgid " (rule from \"%s\", line %d)"
msgstr " (règles de « %s », ligne %d)"
-#: timezone/zic.c:466
+#: timezone/zic.c:449
msgid "warning: "
msgstr "AVERTISSEMENT : "
-#: timezone/zic.c:476
+#: timezone/zic.c:459
#, c-format
msgid ""
"%s: usage is %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
@@ -6192,342 +6349,342 @@ msgstr ""
"%s : l'usage is %s [ --version ] [ -v ] [ -l temps_local ] [ -p règles_posix ] \\\n"
"\t[ -d dossier ] [ -L secondes_écoulées ] [ -y type_année ] [ fichier ... ]\n"
-#: timezone/zic.c:511
+#: timezone/zic.c:494
msgid "wild compilation-time specification of zic_t"
msgstr "compilation sauvage-specification du temps de zic_t"
-#: timezone/zic.c:528
+#: timezone/zic.c:511
#, c-format
msgid "%s: More than one -d option specified\n"
msgstr "%s : option -d spécifiée plus d'une fois\n"
-#: timezone/zic.c:538
+#: timezone/zic.c:521
#, c-format
msgid "%s: More than one -l option specified\n"
msgstr "%s : option -l spécifiée plus d'une fois\n"
-#: timezone/zic.c:548
+#: timezone/zic.c:531
#, c-format
msgid "%s: More than one -p option specified\n"
msgstr "%s : option -p spécifiée plus d'une fois\n"
-#: timezone/zic.c:558
+#: timezone/zic.c:541
#, c-format
msgid "%s: More than one -y option specified\n"
msgstr "%s : option -y spécifiée plus d'une fois\n"
-#: timezone/zic.c:568
+#: timezone/zic.c:551
#, c-format
msgid "%s: More than one -L option specified\n"
msgstr "%s : option -L spécifiée plus d'une fois\n"
-#: timezone/zic.c:617
+#: timezone/zic.c:600
msgid "link to link"
msgstr "lien à lien"
-#: timezone/zic.c:682
+#: timezone/zic.c:665
msgid "hard link failed, symbolic link used"
msgstr "Échec de création du lien direct, création d'un lien symbolique"
-#: timezone/zic.c:690
+#: timezone/zic.c:673
#, c-format
msgid "%s: Can't link from %s to %s: %s\n"
msgstr "%s : ne peut établir un lien entre %s et %s : %s\n"
-#: timezone/zic.c:762 timezone/zic.c:764
+#: timezone/zic.c:745 timezone/zic.c:747
msgid "same rule name in multiple files"
msgstr "Même nom de règle dans plusieurs fichiers"
-#: timezone/zic.c:805
+#: timezone/zic.c:788
msgid "unruly zone"
msgstr "Zone sans règle"
-#: timezone/zic.c:812
+#: timezone/zic.c:795
#, c-format
msgid "%s in ruleless zone"
msgstr "%s est dans une zone sans règle"
-#: timezone/zic.c:833
+#: timezone/zic.c:816
msgid "standard input"
msgstr "entrée standard"
-#: timezone/zic.c:838
+#: timezone/zic.c:821
#, c-format
msgid "%s: Can't open %s: %s\n"
msgstr "%s : ne peut ouvrir %s : %s\n"
-#: timezone/zic.c:849
+#: timezone/zic.c:832
msgid "line too long"
msgstr "Ligne trop longue"
-#: timezone/zic.c:869
+#: timezone/zic.c:852
msgid "input line of unknown type"
msgstr "Ligne d'entrée de type inconnu"
-#: timezone/zic.c:885
+#: timezone/zic.c:868
#, c-format
msgid "%s: Leap line in non leap seconds file %s\n"
msgstr ""
"%s : ligne de type « Leap » dans un fichier qui n'a pas\n"
"de délai en secondes %s\n"
-#: timezone/zic.c:892 timezone/zic.c:1329 timezone/zic.c:1351
+#: timezone/zic.c:875 timezone/zic.c:1312 timezone/zic.c:1334
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
msgstr "%s : panique : valeur %d de type « l_value » invalide\n"
-#: timezone/zic.c:900
+#: timezone/zic.c:883
#, c-format
msgid "%s: Error reading %s\n"
msgstr "%s : erreur de lecture de %s\n"
-#: timezone/zic.c:907
+#: timezone/zic.c:890
#, c-format
msgid "%s: Error closing %s: %s\n"
msgstr "%s : erreur lors de la fermeture de %s : %s\n"
-#: timezone/zic.c:912
+#: timezone/zic.c:895
msgid "expected continuation line not found"
msgstr "ligne de continuation attendue, non repérée"
-#: timezone/zic.c:956 timezone/zic.c:2489 timezone/zic.c:2508
+#: timezone/zic.c:939 timezone/zic.c:2476 timezone/zic.c:2495
msgid "time overflow"
msgstr "Débordement du temps alloué"
-#: timezone/zic.c:960
+#: timezone/zic.c:943
msgid "24:00 not handled by pre-1998 versions of zic"
msgstr "24 : 00 non pris en charge par les versions de zic antérieures à1998 "
-#: timezone/zic.c:963
+#: timezone/zic.c:946
msgid "values over 24 hours not handled by pre-2007 versions of zic"
msgstr "valeurs au-delà de 24 heures non prises en charge par les versions de zic antérieures à 2007"
-#: timezone/zic.c:976
+#: timezone/zic.c:959
msgid "wrong number of fields on Rule line"
msgstr "Mauvais nombre de champs sur la ligne de type « Rule »"
-#: timezone/zic.c:980
+#: timezone/zic.c:963
msgid "nameless rule"
msgstr "Règle sans nom"
-#: timezone/zic.c:985
+#: timezone/zic.c:968
msgid "invalid saved time"
msgstr "Temps sauvegardé invalide"
-#: timezone/zic.c:1006
+#: timezone/zic.c:989
msgid "wrong number of fields on Zone line"
msgstr "Mauvais nombre de champs sur la ligne de type « Zone »"
-#: timezone/zic.c:1012
+#: timezone/zic.c:995
#, c-format
msgid "\"Zone %s\" line and -l option are mutually exclusive"
msgstr "La ligne \"Zone %s\" et l'option -l sont mutuellement exclusifs"
-#: timezone/zic.c:1020
+#: timezone/zic.c:1003
#, c-format
msgid "\"Zone %s\" line and -p option are mutually exclusive"
msgstr "La ligne \"Zone %s\" et l'option -p sont mutuellement exclusifs"
-#: timezone/zic.c:1032
+#: timezone/zic.c:1015
#, c-format
msgid "duplicate zone name %s (file \"%s\", line %d)"
msgstr "Double noms de zone %s (fichier « %s », ligne %d)"
-#: timezone/zic.c:1048
+#: timezone/zic.c:1031
msgid "wrong number of fields on Zone continuation line"
msgstr "Mauvais nombre de champs sur la ligne de type continuation de « Zone »"
-#: timezone/zic.c:1088
+#: timezone/zic.c:1071
msgid "invalid UTC offset"
msgstr "Adressage relatif GMT invalide"
-#: timezone/zic.c:1091
+#: timezone/zic.c:1074
msgid "invalid abbreviation format"
msgstr "Format d'abréviation invalide"
-#: timezone/zic.c:1120
+#: timezone/zic.c:1103
msgid "Zone continuation line end time is not after end time of previous line"
msgstr ""
"Temps final de la ligne de continuation du fuseau horaire est antérieur\n"
"au temps final de la ligne précédente"
-#: timezone/zic.c:1148
+#: timezone/zic.c:1131
msgid "wrong number of fields on Leap line"
msgstr "Mauvais nombre de champs sur la ligne de type « Leap »"
-#: timezone/zic.c:1157
+#: timezone/zic.c:1140
msgid "invalid leaping year"
msgstr "Année bissextile invalide"
-#: timezone/zic.c:1177 timezone/zic.c:1283
+#: timezone/zic.c:1160 timezone/zic.c:1266
msgid "invalid month name"
msgstr "Nom de mois invalide"
-#: timezone/zic.c:1190 timezone/zic.c:1396 timezone/zic.c:1410
+#: timezone/zic.c:1173 timezone/zic.c:1379 timezone/zic.c:1393
msgid "invalid day of month"
msgstr "Jour du mois invalide"
# time/zic.c:1120A
-#: timezone/zic.c:1195
+#: timezone/zic.c:1178
msgid "time before zero"
msgstr "Temps défini avant le zéro"
-#: timezone/zic.c:1199
+#: timezone/zic.c:1182
msgid "time too small"
msgstr "valeur de temps trop petite"
-#: timezone/zic.c:1203
+#: timezone/zic.c:1186
msgid "time too large"
msgstr "valeur de temps trop grande"
-#: timezone/zic.c:1207 timezone/zic.c:1312
+#: timezone/zic.c:1190 timezone/zic.c:1295
msgid "invalid time of day"
msgstr "Heure du jour invalide"
-#: timezone/zic.c:1226
+#: timezone/zic.c:1209
msgid "illegal CORRECTION field on Leap line"
msgstr "champ CORRECTION non permis dans la ligne de type « Leap »"
-#: timezone/zic.c:1231
+#: timezone/zic.c:1214
msgid "illegal Rolling/Stationary field on Leap line"
msgstr "Champ « Rolling/Stationary » non permis sur la ligne de type « Leap »"
-#: timezone/zic.c:1247
+#: timezone/zic.c:1230
msgid "wrong number of fields on Link line"
msgstr "Mauvais nombre de champs sur la ligne de type « Link »"
-#: timezone/zic.c:1251
+#: timezone/zic.c:1234
msgid "blank FROM field on Link line"
msgstr "Champ « FROM » vide dans la ligne de type « Link »"
-#: timezone/zic.c:1255
+#: timezone/zic.c:1238
msgid "blank TO field on Link line"
msgstr "Champ « TO » vide dans la ligne de type « Link »"
-#: timezone/zic.c:1333
+#: timezone/zic.c:1316
msgid "invalid starting year"
msgstr "Année initiale invalide"
-#: timezone/zic.c:1355
+#: timezone/zic.c:1338
msgid "invalid ending year"
msgstr "Année finale invalide"
-#: timezone/zic.c:1359
+#: timezone/zic.c:1342
msgid "starting year greater than ending year"
msgstr "année initiale plus grande que l'année finale"
-#: timezone/zic.c:1366
+#: timezone/zic.c:1349
msgid "typed single year"
msgstr "une seule année fournie"
-#: timezone/zic.c:1401
+#: timezone/zic.c:1384
msgid "invalid weekday name"
msgstr "Nom du jour de semaine invalide"
-#: timezone/zic.c:1579
+#: timezone/zic.c:1562
#, c-format
msgid "%s: Can't remove %s: %s\n"
msgstr "%s : ne peut enlever %s : %s\n"
-#: timezone/zic.c:1589
+#: timezone/zic.c:1572
#, c-format
msgid "%s: Can't create %s: %s\n"
msgstr "%s : ne peut créer %s : %s\n"
-#: timezone/zic.c:1739
+#: timezone/zic.c:1722
#, c-format
msgid "%s: Error writing %s\n"
msgstr "%s : erreur d'écriture de %s\n"
-#: timezone/zic.c:2031
+#: timezone/zic.c:2015
msgid "no POSIX environment variable for zone"
msgstr "pas de variable d'environnement POSIX pour zone"
-#: timezone/zic.c:2185
+#: timezone/zic.c:2172
msgid "can't determine time zone abbreviation to use just after until time"
msgstr ""
"Ne peut déterminer l'abréviation du fuseau horaire à utiliser\n"
"juste après telle date"
-#: timezone/zic.c:2231
+#: timezone/zic.c:2218
msgid "too many transitions?!"
msgstr "trop de transitions définies ? !"
-#: timezone/zic.c:2250
+#: timezone/zic.c:2237
msgid "internal error - addtype called with bad isdst"
msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « isdst »"
-#: timezone/zic.c:2254
+#: timezone/zic.c:2241
msgid "internal error - addtype called with bad ttisstd"
msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « ttisstd »"
-#: timezone/zic.c:2258
+#: timezone/zic.c:2245
msgid "internal error - addtype called with bad ttisgmt"
msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « ttisgmt »"
-#: timezone/zic.c:2277
+#: timezone/zic.c:2264
msgid "too many local time types"
msgstr "trop de types localisés pour la représentation du temps"
-#: timezone/zic.c:2281
+#: timezone/zic.c:2268
msgid "UTC offset out of range"
msgstr "UTC décalage en dehors de la plage"
-#: timezone/zic.c:2309
+#: timezone/zic.c:2296
msgid "too many leap seconds"
msgstr "trop de délai en secondes"
-#: timezone/zic.c:2315
+#: timezone/zic.c:2302
msgid "repeated leap second moment"
msgstr "Répétition du délai une seconde fois"
-#: timezone/zic.c:2367
+#: timezone/zic.c:2354
msgid "Wild result from command execution"
msgstr "Résultat anarchique résultant de l'exécution de la commande"
-#: timezone/zic.c:2368
+#: timezone/zic.c:2355
#, c-format
msgid "%s: command was '%s', result was %d\n"
msgstr "%s : la commande était « %s », le résultat était %d\n"
-#: timezone/zic.c:2466
+#: timezone/zic.c:2453
msgid "Odd number of quotation marks"
msgstr "Nombre impair de caractères apostrophe"
-#: timezone/zic.c:2555
+#: timezone/zic.c:2542
msgid "use of 2/29 in non leap-year"
msgstr "Utiliser 2/29 pour les années non-bissextiles"
-#: timezone/zic.c:2590
+#: timezone/zic.c:2577
msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
msgstr "la règle en dehors de début/fin du mois--ne fonctionnera pas avec les versions de zic antérieures à 2004"
-#: timezone/zic.c:2622
+#: timezone/zic.c:2609
msgid "time zone abbreviation lacks alphabetic at start"
msgstr "l'abréviation du nom de fuseau horaire n'a pas de caractère alphabétique au début"
-#: timezone/zic.c:2624
+#: timezone/zic.c:2611
msgid "time zone abbreviation has more than 3 alphabetics"
msgstr "l'abréviation du nom de fuseau horaire a plus de 3 caractères alphabétiques"
-#: timezone/zic.c:2626
+#: timezone/zic.c:2613
msgid "time zone abbreviation has too many alphabetics"
msgstr "l'abréviation du nom de fuseau horaire a trop de caractères alphabétiques"
-#: timezone/zic.c:2636
+#: timezone/zic.c:2623
msgid "time zone abbreviation differs from POSIX standard"
msgstr "l'abréviation du nom de fuseau horaire diffère du standard POSIX"
-#: timezone/zic.c:2648
+#: timezone/zic.c:2635
msgid "too many, or too long, time zone abbreviations"
msgstr "trop ou de trop longues abréviations de fuseaux horaires"
-#: timezone/zic.c:2689
+#: timezone/zic.c:2676
#, c-format
msgid "%s: Can't create directory %s: %s\n"
msgstr "%s : ne peut créer le dossier %s : %s\n"
-#: timezone/zic.c:2711
+#: timezone/zic.c:2698
#, c-format
msgid "%s: %d did not sign extend correctly\n"
msgstr "%s : %d n'a pas fait correctement l'expansion de la valeur signée\n"
diff --git a/libc/resolv/nss_dns/dns-host.c b/libc/resolv/nss_dns/dns-host.c
index a9462ae97..62e67e8b0 100644
--- a/libc/resolv/nss_dns/dns-host.c
+++ b/libc/resolv/nss_dns/dns-host.c
@@ -824,7 +824,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
switch (type)
{
case T_PTR:
- if (__builtin_expect (__strcasecmp (tname, bp) != 0, 0))
+ if (__builtin_expect (strcasecmp (tname, bp) != 0, 0))
{
syslog (LOG_NOTICE | LOG_AUTH, AskedForGot, qname, bp);
cp += n;
diff --git a/libc/resolv/res_hconf.c b/libc/resolv/res_hconf.c
index 25f739792..ed55bec29 100644
--- a/libc/resolv/res_hconf.c
+++ b/libc/resolv/res_hconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@azstarnet.com).
diff --git a/libc/resolv/res_init.c b/libc/resolv/res_init.c
index 2bf830cc9..8841fe9fa 100644
--- a/libc/resolv/res_init.c
+++ b/libc/resolv/res_init.c
@@ -540,6 +540,9 @@ res_setoptions(res_state statp, const char *options, const char *source) {
statp->options |= RES_NOCHECKNAME;
} else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
statp->options |= RES_USE_EDNS0;
+ } else if (!strncmp(cp, "single-request",
+ sizeof("single-request") - 1)) {
+ statp->options |= RES_SNGLKUP;
} else {
/* XXX - print a warning here? */
}
diff --git a/libc/resolv/res_send.c b/libc/resolv/res_send.c
index f75a26ec2..0490b52fc 100644
--- a/libc/resolv/res_send.c
+++ b/libc/resolv/res_send.c
@@ -923,12 +923,12 @@ send_dg(res_state statp,
struct pollfd pfd[1];
int ptimeout;
struct sockaddr_in6 from;
- int resplen, seconds, n;
+ int resplen, n;
if (EXT(statp).nssocks[ns] == -1) {
/* only try IPv6 if IPv6 NS and if not failed before */
if ((EXT(statp).nscount6 > 0) && !statp->ipv6_unavail) {
- if (__have_o_nonblock >= 0) {
+ if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
EXT(statp).nssocks[ns] =
socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK,
0);
@@ -939,7 +939,7 @@ send_dg(res_state statp,
&& errno == EINVAL ? -1 : 1);
#endif
}
- if (__have_o_nonblock < 0)
+ if (__builtin_expect (__have_o_nonblock < 0, 0))
EXT(statp).nssocks[ns] =
socket(PF_INET6, SOCK_DGRAM, 0);
if (EXT(statp).nssocks[ns] < 0)
@@ -950,7 +950,7 @@ send_dg(res_state statp,
convaddr4to6(nsap);
}
if (EXT(statp).nssocks[ns] < 0) {
- if (__have_o_nonblock >= 0) {
+ if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
EXT(statp).nssocks[ns]
= socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK,
0);
@@ -961,7 +961,7 @@ send_dg(res_state statp,
&& errno == EINVAL ? -1 : 1);
#endif
}
- if (__have_o_nonblock < 0)
+ if (__builtin_expect (__have_o_nonblock < 0, 0))
EXT(statp).nssocks[ns]
= socket(PF_INET, SOCK_DGRAM, 0);
}
@@ -989,7 +989,7 @@ send_dg(res_state statp,
__res_iclose(statp, false);
return (0);
}
- if (__have_o_nonblock < 0) {
+ if (__builtin_expect (__have_o_nonblock < 0, 0)) {
/* Make socket non-blocking. */
int fl = __fcntl (EXT(statp).nssocks[ns], F_GETFL);
if (fl != -1)
@@ -1003,11 +1003,14 @@ send_dg(res_state statp,
/*
* Compute time for the total operation.
*/
- seconds = (statp->retrans << ns);
+ int seconds = (statp->retrans << ns);
if (ns > 0)
seconds /= statp->nscount;
if (seconds <= 0)
seconds = 1;
+ bool single_request = ((statp->options) & RES_SNGLKUP) != 0;// XXX
+ int save_gotsomewhere = *gotsomewhere;
+ retry:
evNowTime(&now);
evConsTime(&timeout, seconds, 0);
evAddTime(&finish, &now, &timeout);
@@ -1031,6 +1034,7 @@ send_dg(res_state statp,
return (0);
}
evSubTime(&timeout, &finish, &now);
+ need_recompute = 0;
}
/* Convert struct timespec in milliseconds. */
ptimeout = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000;
@@ -1046,8 +1050,16 @@ send_dg(res_state statp,
Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
if (resplen > 1 && (recvresp1 || (buf2 != NULL && recvresp2)))
{
- *resplen2 = 1;
- return resplen;
+ /* There are quite a few broken name servers out
+ there which don't handle two outstanding
+ requests from the same source. There are also
+ broken firewall settings. If we time out after
+ having received one answer switch to the mode
+ where we send the second request only once we
+ have received the first answer. */
+ single_request = true;
+ *gotsomewhere = save_gotsomewhere;
+ goto retry;
}
*gotsomewhere = 1;
@@ -1073,7 +1085,7 @@ send_dg(res_state statp,
Perror(statp, stderr, "send", errno);
goto err_out;
}
- if (nwritten != 0 || buf2 == NULL)
+ if (nwritten != 0 || buf2 == NULL || single_request)
pfd[0].events = POLLIN;
else
pfd[0].events = POLLIN | POLLOUT;
@@ -1286,8 +1298,11 @@ send_dg(res_state statp,
else
recvresp2 = 1;
/* Repeat waiting if we have a second answer to arrive. */
- if ((recvresp1 & recvresp2) == 0)
+ if ((recvresp1 & recvresp2) == 0) {
+ if (single_request)
+ pfd[0].events = POLLOUT;
goto wait;
+ }
/*
* All is well, or the error is fatal. Signal that the
* next nameserver ought not be tried.
diff --git a/libc/resolv/resolv.h b/libc/resolv/resolv.h
index a0de320d0..c6e695dc7 100644
--- a/libc/resolv/resolv.h
+++ b/libc/resolv/resolv.h
@@ -215,6 +215,7 @@ struct res_sym {
#define RES_NOIP6DOTINT 0x00080000 /* Do not use .ip6.int in IPv6
reverse lookup */
#define RES_USE_EDNS0 0x00100000 /* Use EDNS0. */
+#define RES_SNGLKUP 0x00200000 /* one outstanding request at a time */
#define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH|RES_NOIP6DOTINT)
diff --git a/libc/scripts/check-local-headers.sh b/libc/scripts/check-local-headers.sh
index a945ffb99..d15e9a441 100755
--- a/libc/scripts/check-local-headers.sh
+++ b/libc/scripts/check-local-headers.sh
@@ -1,5 +1,5 @@
#! /bin/bash
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,8 @@ fgrep -v "$includedir/asm" |
fgrep -v "$includedir/linux" |
fgrep -v "$includedir/selinux" |
fgrep -v "$includedir/sys/capability.h" |
-fgrep -v "$includedir/gd"; then
+fgrep -v "$includedir/gd" |
+fgrep -v "$includedir/nss3"; then
# If we found a match something is wrong.
exit 1
fi
diff --git a/libc/stdio-common/Makefile b/libc/stdio-common/Makefile
index a42964119..4cdb56941 100644
--- a/libc/stdio-common/Makefile
+++ b/libc/stdio-common/Makefile
@@ -29,6 +29,7 @@ routines := \
ctermid cuserid \
_itoa _itowa itoa-digits itoa-udigits itowa-digits \
vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \
+ reg-modifier reg-type \
printf_size fprintf printf snprintf sprintf asprintf dprintf \
vfscanf \
fscanf scanf sscanf \
diff --git a/libc/stdio-common/Versions b/libc/stdio-common/Versions
index af693fff5..3503a84e6 100644
--- a/libc/stdio-common/Versions
+++ b/libc/stdio-common/Versions
@@ -55,6 +55,7 @@ libc {
}
GLIBC_2.10 {
psiginfo;
+ register_printf_modifier; register_printf_type; register_printf_specifier;
}
GLIBC_PRIVATE {
# global variables
diff --git a/libc/stdio-common/printf-parse.h b/libc/stdio-common/printf-parse.h
index f6ad71cd3..555ad78f3 100644
--- a/libc/stdio-common/printf-parse.h
+++ b/libc/stdio-common/printf-parse.h
@@ -1,5 +1,5 @@
/* Internal header for parsing printf format strings.
- Copyright (C) 1995-1999, 2000, 2002, 2003, 2007
+ Copyright (C) 1995-1999, 2000, 2002, 2003, 2007, 2009
Free Software Foundation, Inc.
This file is part of th GNU C Library.
@@ -42,6 +42,8 @@ struct printf_spec
int data_arg_type; /* Type of first argument. */
/* Number of arguments consumed by this format specifier. */
size_t ndata_args;
+ /* Size of the parameter for PA_USER type. */
+ int size;
};
@@ -60,6 +62,7 @@ union printf_arg
const char *pa_string;
const wchar_t *pa_wstring;
void *pa_pointer;
+ void *pa_user;
};
@@ -83,8 +86,9 @@ read_int (const UCHAR_T * *pstr)
/* These are defined in reg-printf.c. */
-extern printf_arginfo_function **__printf_arginfo_table attribute_hidden;
+extern printf_arginfo_size_function **__printf_arginfo_table attribute_hidden;
extern printf_function **__printf_function_table attribute_hidden;
+extern printf_va_arg_function **__printf_va_arg_table attribute_hidden;
/* Find the next spec in FORMAT, or the end of the string. Returns
@@ -114,3 +118,18 @@ extern size_t __parse_one_specmb (const unsigned char *format, size_t posn,
extern size_t __parse_one_specwc (const unsigned int *format, size_t posn,
struct printf_spec *spec,
size_t *max_ref_arg) attribute_hidden;
+
+
+
+/* This variable is defined in reg-modifier.c. */
+struct printf_modifier_record;
+extern struct printf_modifier_record **__printf_modifier_table
+ attribute_hidden;
+
+/* Handle registered modifiers. */
+extern int __handle_registered_modifier_mb (const unsigned char **format,
+ struct printf_info *info)
+ attribute_hidden;
+extern int __handle_registered_modifier_wc (const unsigned int **format,
+ struct printf_info *info)
+ attribute_hidden;
diff --git a/libc/stdio-common/printf-parsemb.c b/libc/stdio-common/printf-parsemb.c
index da6fd3edb..efd1eca3a 100644
--- a/libc/stdio-common/printf-parsemb.c
+++ b/libc/stdio-common/printf-parsemb.c
@@ -1,5 +1,5 @@
/* Helper functions for parsing printf format strings.
- Copyright (C) 1995-2000,2002,2003,2004,2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000,2002-2004,2006,2009 Free Software Foundation, Inc.
This file is part of th GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,12 +31,14 @@
# define INT_T int
# define L_(Str) Str
# define ISDIGIT(Ch) isdigit (Ch)
+# define HANDLE_REGISTERED_MODIFIER __handle_registered_modifier_mb
#else
# define CHAR_T wchar_t
# define UCHAR_T unsigned int
# define INT_T wint_t
# define L_(Str) L##Str
# define ISDIGIT(Ch) iswdigit (Ch)
+# define HANDLE_REGISTERED_MODIFIER __handle_registered_modifier_wc
#endif
#include "printf-parse.h"
@@ -223,72 +225,79 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
spec->info.is_short = 0;
spec->info.is_long = 0;
spec->info.is_char = 0;
-
- switch (*format++)
- {
- case L_('h'):
- /* ints are short ints or chars. */
- if (*format != L_('h'))
- spec->info.is_short = 1;
- else
- {
- ++format;
- spec->info.is_char = 1;
- }
- break;
- case L_('l'):
- /* ints are long ints. */
- spec->info.is_long = 1;
- if (*format != L_('l'))
+ spec->info.user = 0;
+
+ if (__builtin_expect (__printf_modifier_table == NULL, 1)
+ || __printf_modifier_table[*format] == NULL
+ || HANDLE_REGISTERED_MODIFIER (&format, &spec->info) != 0)
+ switch (*format++)
+ {
+ case L_('h'):
+ /* ints are short ints or chars. */
+ if (*format != L_('h'))
+ spec->info.is_short = 1;
+ else
+ {
+ ++format;
+ spec->info.is_char = 1;
+ }
break;
- ++format;
- /* FALLTHROUGH */
- case L_('L'):
- /* doubles are long doubles, and ints are long long ints. */
- case L_('q'):
- /* 4.4 uses this for long long. */
- spec->info.is_long_double = 1;
- break;
- case L_('z'):
- case L_('Z'):
- /* ints are size_ts. */
- assert (sizeof (size_t) <= sizeof (unsigned long long int));
+ case L_('l'):
+ /* ints are long ints. */
+ spec->info.is_long = 1;
+ if (*format != L_('l'))
+ break;
+ ++format;
+ /* FALLTHROUGH */
+ case L_('L'):
+ /* doubles are long doubles, and ints are long long ints. */
+ case L_('q'):
+ /* 4.4 uses this for long long. */
+ spec->info.is_long_double = 1;
+ break;
+ case L_('z'):
+ case L_('Z'):
+ /* ints are size_ts. */
+ assert (sizeof (size_t) <= sizeof (unsigned long long int));
#if LONG_MAX != LONG_LONG_MAX
- spec->info.is_long_double = sizeof (size_t) > sizeof (unsigned long int);
+ spec->info.is_long_double = (sizeof (size_t)
+ > sizeof (unsigned long int));
#endif
- spec->info.is_long = sizeof (size_t) > sizeof (unsigned int);
- break;
- case L_('t'):
- assert (sizeof (ptrdiff_t) <= sizeof (long long int));
+ spec->info.is_long = sizeof (size_t) > sizeof (unsigned int);
+ break;
+ case L_('t'):
+ assert (sizeof (ptrdiff_t) <= sizeof (long long int));
#if LONG_MAX != LONG_LONG_MAX
- spec->info.is_long_double = (sizeof (ptrdiff_t) > sizeof (long int));
+ spec->info.is_long_double = (sizeof (ptrdiff_t) > sizeof (long int));
#endif
- spec->info.is_long = sizeof (ptrdiff_t) > sizeof (int);
- break;
- case L_('j'):
- assert (sizeof (uintmax_t) <= sizeof (unsigned long long int));
+ spec->info.is_long = sizeof (ptrdiff_t) > sizeof (int);
+ break;
+ case L_('j'):
+ assert (sizeof (uintmax_t) <= sizeof (unsigned long long int));
#if LONG_MAX != LONG_LONG_MAX
- spec->info.is_long_double = (sizeof (uintmax_t)
- > sizeof (unsigned long int));
+ spec->info.is_long_double = (sizeof (uintmax_t)
+ > sizeof (unsigned long int));
#endif
- spec->info.is_long = sizeof (uintmax_t) > sizeof (unsigned int);
- break;
- default:
- /* Not a recognized modifier. Backup. */
- --format;
- break;
- }
+ spec->info.is_long = sizeof (uintmax_t) > sizeof (unsigned int);
+ break;
+ default:
+ /* Not a recognized modifier. Backup. */
+ --format;
+ break;
+ }
/* Get the format specification. */
spec->info.spec = (wchar_t) *format++;
- if (__builtin_expect (__printf_function_table != NULL, 0)
- && spec->info.spec <= UCHAR_MAX
- && __printf_arginfo_table[spec->info.spec] != NULL)
- /* We don't try to get the types for all arguments if the format
- uses more than one. The normal case is covered though. */
- spec->ndata_args = (*__printf_arginfo_table[spec->info.spec])
- (&spec->info, 1, &spec->data_arg_type);
- else
+ spec->size = -1;
+ if (__builtin_expect (__printf_function_table == NULL, 1)
+ || spec->info.spec > UCHAR_MAX
+ || __printf_arginfo_table[spec->info.spec] == NULL
+ /* We don't try to get the types for all arguments if the format
+ uses more than one. The normal case is covered though. If
+ the call returns -1 we continue with the normal specifiers. */
+ || (spec->ndata_args = (*__printf_arginfo_table[spec->info.spec])
+ (&spec->info, 1, &spec->data_arg_type,
+ &spec->size)) < 0)
{
/* Find the data argument types of a built-in spec. */
spec->ndata_args = 1;
diff --git a/libc/stdio-common/printf-prs.c b/libc/stdio-common/printf-prs.c
index aabc9ed85..e8d84b3be 100644
--- a/libc/stdio-common/printf-prs.c
+++ b/libc/stdio-common/printf-prs.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002-2005, 2007, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -97,7 +97,8 @@ parse_printf_format (fmt, n, argtypes)
/* We have more than one argument for this format spec. We must
call the arginfo function again to determine all the types. */
(void) (*__printf_arginfo_table[spec.info.spec])
- (&spec.info, n - spec.data_arg, &argtypes[spec.data_arg]);
+ (&spec.info, n - spec.data_arg, &argtypes[spec.data_arg],
+ &spec.size);
break;
}
}
diff --git a/libc/stdio-common/printf.h b/libc/stdio-common/printf.h
index 360cdcce1..a11af0227 100644
--- a/libc/stdio-common/printf.h
+++ b/libc/stdio-common/printf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993,1995-1999,2000,2001,2006
+/* Copyright (C) 1991-1993,1995-2001,2006,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -29,6 +29,7 @@ __BEGIN_DECLS
#define __need_size_t
#define __need_wchar_t
#include <stddef.h>
+#include <stdarg.h>
struct printf_info
@@ -48,6 +49,8 @@ struct printf_info
unsigned int is_char:1; /* hh flag. */
unsigned int wide:1; /* Nonzero for wide character streams. */
unsigned int i18n:1; /* I flag. */
+ unsigned int __pad:4; /* Unused so far. */
+ unsigned short int user; /* Bits for user-installed modifiers. */
wchar_t pad; /* Padding character. */
};
@@ -68,18 +71,55 @@ typedef int printf_function (FILE *__stream,
/* Type of a printf specifier-arginfo function.
INFO gives information about the format specification.
- N, ARGTYPES, and return value are as for parse_printf_format. */
+ N, ARGTYPES, *SIZE has to contain the size of the parameter for
+ user-defined types, and return value are as for parse_printf_format
+ except that -1 should be returned if the handler cannot handle
+ this case. This allows to partially overwrite the functionality
+ of existing format specifiers. */
+
+typedef int printf_arginfo_size_function (__const struct printf_info *__info,
+ size_t __n, int *__argtypes,
+ int *__size);
+
+/* Old version of 'printf_arginfo_function' without a SIZE parameter. */
typedef int printf_arginfo_function (__const struct printf_info *__info,
size_t __n, int *__argtypes);
+/* Type of a function to get a value of a user-defined from the
+ variable argument list. */
+typedef void printf_va_arg_function (void *__mem, va_list *__ap);
+
/* Register FUNC to be called to format SPEC specifiers; ARGINFO must be
specified to determine how many arguments a SPEC conversion requires and
what their types are. */
+extern int register_printf_specifier (int __spec, printf_function __func,
+ printf_arginfo_size_function __arginfo)
+ __THROW;
+
+
+/* Obsolete interface similar to register_printf_specifier. It can only
+ handle basic data types because the ARGINFO callback does not return
+ information on the size of the user-defined type. */
+
extern int register_printf_function (int __spec, printf_function __func,
- printf_arginfo_function __arginfo);
+ printf_arginfo_function __arginfo)
+ __THROW __attribute_deprecated__;
+
+
+/* Register a new modifier character sequence. If the call succeeds
+ it returns a positive value representing the bit set in the USER
+ field in 'struct printf_info'. */
+
+extern int register_printf_modifier (wchar_t *__str) __wur __THROW;
+
+
+/* Register variable argument handler for user type. The return value
+ is to be used in ARGINFO functions to signal the use of the
+ type. */
+extern int register_printf_type (printf_va_arg_function __fct) __wur __THROW;
/* Parse FMT, and fill in N elements of ARGTYPES with the
@@ -100,7 +140,8 @@ extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n,
/* Codes returned by `parse_printf_format' for basic types.
These values cover all the standard format specifications.
- Users can add new values after PA_LAST for their own types. */
+ Users can reserve new values after PA_LAST for their own types
+ using 'register_printf_type'. */
enum
{ /* C type: */
diff --git a/libc/stdio-common/reg-modifier.c b/libc/stdio-common/reg-modifier.c
new file mode 100644
index 000000000..69bb2ef3d
--- /dev/null
+++ b/libc/stdio-common/reg-modifier.c
@@ -0,0 +1,202 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <limits.h>
+#include <printf.h>
+#include <wchar.h>
+#include <bits/libc-lock.h>
+
+
+struct printf_modifier_record
+{
+ struct printf_modifier_record *next;
+ int bit;
+ wchar_t str[0];
+};
+
+struct printf_modifier_record **__printf_modifier_table attribute_hidden;
+
+__libc_lock_define_initialized (static, lock)
+
+/* Bits to hand out. */
+static int next_bit;
+
+
+int
+__register_printf_modifier (wchar_t *str)
+{
+ if (str[0] == L'\0')
+ {
+ einval:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ wchar_t *wc = str;
+ while (*wc != L'\0')
+ if (*wc < 0 || *wc > (wchar_t) UCHAR_MAX)
+ goto einval;
+ else
+ ++wc;
+
+ if (next_bit / 8 == sizeof (((struct printf_info *) NULL)->user))
+ {
+ __set_errno (ENOSPC);
+ return -1;
+ }
+
+ int result = -1;
+ __libc_lock_lock (lock);
+
+ if (__printf_modifier_table == NULL)
+ {
+ __printf_modifier_table = calloc (UCHAR_MAX,
+ sizeof (*__printf_modifier_table));
+ if (__printf_modifier_table == NULL)
+ goto out;
+ }
+
+ /* Create enough room for the string. But we don't need the first
+ character. */
+ struct printf_modifier_record *newp = malloc (sizeof (*newp)
+ + ((wc - str)
+ * sizeof (wchar_t)));
+ if (newp == NULL)
+ goto out;
+
+ newp->next = __printf_modifier_table[(unsigned char) *str];
+ newp->bit = 1 << next_bit++;
+ __wmemcpy (newp->str, str + 1, wc - str);
+
+ __printf_modifier_table[(unsigned char) *str] = newp;
+
+ result = newp->bit;
+
+ out:
+ __libc_lock_unlock (lock);
+
+ return result;
+}
+weak_alias (__register_printf_modifier, register_printf_modifier)
+
+
+#include <stdio.h>
+int
+attribute_hidden
+__handle_registered_modifier_mb (const unsigned char **format,
+ struct printf_info *info)
+{
+ struct printf_modifier_record *runp = __printf_modifier_table[**format];
+
+ int best_bit = 0;
+ int best_len = 0;
+ const unsigned char *best_cp = NULL;
+
+ while (runp != NULL)
+ {
+ const unsigned char *cp = *format + 1;
+ wchar_t *fcp = runp->str;
+
+ while (*cp != '\0' && *fcp != L'\0')
+ if (*cp != *fcp)
+ break;
+ else
+ ++cp, ++fcp;
+
+ if (*fcp == L'\0' && cp - *format > best_len)
+ {
+ best_cp = cp;
+ best_len = cp - *format;
+ best_bit = runp->bit;
+ }
+
+ runp = runp->next;
+ }
+
+ if (best_bit != 0)
+ {
+ info->user |= best_bit;
+ *format = best_cp;
+ return 0;
+ }
+
+ return 1;
+}
+
+
+int
+attribute_hidden
+__handle_registered_modifier_wc (const unsigned int **format,
+ struct printf_info *info)
+{
+ struct printf_modifier_record *runp = __printf_modifier_table[**format];
+
+ int best_bit = 0;
+ int best_len = 0;
+ const unsigned int *best_cp = NULL;
+
+ while (runp != NULL)
+ {
+ const unsigned int *cp = *format + 1;
+ wchar_t *fcp = runp->str;
+
+ while (*cp != '\0' && *fcp != L'\0')
+ if (*cp != *fcp)
+ break;
+ else
+ ++cp, ++fcp;
+
+ if (*fcp == L'\0' && cp - *format > best_len)
+ {
+ best_cp = cp;
+ best_len = cp - *format;
+ best_bit = runp->bit;
+ }
+
+ runp = runp->next;
+ }
+
+ if (best_bit != 0)
+ {
+ info->user |= best_bit;
+ *format = best_cp;
+ return 0;
+ }
+
+ return 1;
+}
+
+
+libc_freeres_fn (free_mem)
+{
+ if (__printf_modifier_table != NULL)
+ {
+ for (int i = 0; i < UCHAR_MAX; ++i)
+ {
+ struct printf_modifier_record *runp = __printf_modifier_table[i];
+ while (runp != NULL)
+ {
+ struct printf_modifier_record *oldp = runp;
+ runp = runp->next;
+ free (oldp);
+ }
+ }
+ free (__printf_modifier_table);
+ }
+}
diff --git a/libc/stdio-common/reg-printf.c b/libc/stdio-common/reg-printf.c
index dbb6234e5..b5cab679d 100644
--- a/libc/stdio-common/reg-printf.c
+++ b/libc/stdio-common/reg-printf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1996,1997,2002,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,2002-2004,2009 Free Software 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,21 +21,28 @@
#include <printf.h>
#include <stddef.h>
#include <stdlib.h>
+#include <bits/libc-lock.h>
+
/* Array of functions indexed by format character. */
-libc_freeres_ptr (printf_arginfo_function **__printf_arginfo_table)
+libc_freeres_ptr (printf_arginfo_size_function **__printf_arginfo_table)
attribute_hidden;
printf_function **__printf_function_table attribute_hidden;
+__libc_lock_define_initialized (static, lock)
+
+int __register_printf_specifier (int, printf_function,
+ printf_arginfo_size_function);
int __register_printf_function (int, printf_function,
- printf_arginfo_function) __THROW;
+ printf_arginfo_function);
+
/* Register FUNC to be called to format SPEC specifiers. */
int
-__register_printf_function (spec, converter, arginfo)
+__register_printf_specifier (spec, converter, arginfo)
int spec;
printf_function converter;
- printf_arginfo_function arginfo;
+ printf_arginfo_size_function arginfo;
{
if (spec < 0 || spec > (int) UCHAR_MAX)
{
@@ -43,12 +50,19 @@ __register_printf_function (spec, converter, arginfo)
return -1;
}
+ int result = 0;
+ __libc_lock_lock (lock);
+
if (__printf_function_table == NULL)
{
- __printf_arginfo_table = (printf_arginfo_function **)
+ __printf_arginfo_table = (printf_arginfo_size_function **)
calloc (UCHAR_MAX + 1, sizeof (void *) * 2);
if (__printf_arginfo_table == NULL)
- return -1;
+ {
+ result = -1;
+ goto out;
+ }
+
__printf_function_table = (printf_function **)
(__printf_arginfo_table + UCHAR_MAX + 1);
}
@@ -56,6 +70,22 @@ __register_printf_function (spec, converter, arginfo)
__printf_function_table[spec] = converter;
__printf_arginfo_table[spec] = arginfo;
- return 0;
+ out:
+ __libc_lock_unlock (lock);
+
+ return result;
+}
+weak_alias (__register_printf_specifier, register_printf_specifier)
+
+
+/* Register FUNC to be called to format SPEC specifiers. */
+int
+__register_printf_function (spec, converter, arginfo)
+ int spec;
+ printf_function converter;
+ printf_arginfo_function arginfo;
+{
+ return __register_printf_specifier (spec, converter,
+ (printf_arginfo_size_function*) arginfo);
}
weak_alias (__register_printf_function, register_printf_function)
diff --git a/libc/stdio-common/reg-type.c b/libc/stdio-common/reg-type.c
new file mode 100644
index 000000000..7a96b2893
--- /dev/null
+++ b/libc/stdio-common/reg-type.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <printf.h>
+#include <stdlib.h>
+#include <bits/libc-lock.h>
+
+
+/* Array of functions indexed by format character. */
+libc_freeres_ptr (printf_va_arg_function **__printf_va_arg_table)
+ attribute_hidden;
+
+__libc_lock_define_initialized (static, lock);
+
+/* Last type allocated. */
+static int pa_next_type = PA_LAST;
+
+
+int
+__register_printf_type (printf_va_arg_function fct)
+{
+ int result = -1;
+ __libc_lock_lock (lock);
+
+ if (__printf_va_arg_table == NULL)
+ {
+ __printf_va_arg_table = (printf_va_arg_function **)
+ calloc (0x100 - PA_LAST, sizeof (void *));
+ if (__printf_va_arg_table == NULL)
+ goto out;
+ }
+
+ if (pa_next_type == 0x100)
+ __set_errno (ENOSPC);
+ else
+ {
+ result = pa_next_type++;
+ __printf_va_arg_table[result - PA_LAST] = fct;
+ }
+
+ out:
+ __libc_lock_unlock (lock);
+
+ return result;
+}
+weak_alias (__register_printf_type, register_printf_type)
diff --git a/libc/stdio-common/vfprintf.c b/libc/stdio-common/vfprintf.c
index 6eedcc54a..87e09c94e 100644
--- a/libc/stdio-common/vfprintf.c
+++ b/libc/stdio-common/vfprintf.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -252,7 +251,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
/* This table maps a character into a number representing a
class. In each step there is a destination label for each
class. */
- static const int jump_table[] =
+ static const uint8_t jump_table[] =
{
/* ' ' */ 1, 0, 0, /* '#' */ 4,
0, /* '%' */ 14, 0, /* '\''*/ 6,
@@ -1652,6 +1651,7 @@ do_positional:
size_t nargs = 0;
int *args_type;
union printf_arg *args_value = NULL;
+ int *args_size;
/* Positional parameters refer to arguments directly. This could
also determine the maximum number of arguments. Track the
@@ -1686,24 +1686,10 @@ do_positional:
{
/* Extend the array of format specifiers. */
struct printf_spec *old = specs;
+ specs = extend_alloca (specs, nspecs_max, 2 * nspecs_max);
- nspecs_max *= 2;
- specs = alloca (nspecs_max * sizeof (struct printf_spec));
-
- if (specs == &old[nspecs])
- /* Stack grows up, OLD was the last thing allocated;
- extend it. */
- nspecs_max += nspecs_max / 2;
- else
- {
- /* Copy the old array's elements to the new space. */
- memcpy (specs, old, nspecs * sizeof (struct printf_spec));
- if (old == &specs[nspecs])
- /* Stack grows down, OLD was just below the new
- SPECS. We can use that space when the new space
- runs out. */
- nspecs_max += nspecs_max / 2;
- }
+ /* Copy the old array's elements to the new space. */
+ memmove (specs, old, nspecs * sizeof (struct printf_spec));
}
/* Parse the format specifier. */
@@ -1722,6 +1708,7 @@ do_positional:
memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
nargs * sizeof (int));
args_value = alloca (nargs * sizeof (union printf_arg));
+ args_size = alloca (nargs * sizeof (int));
/* XXX Could do sanity check here: If any element in ARGS_TYPE is
still zero after this loop, format is invalid. For now we
@@ -1742,8 +1729,10 @@ do_positional:
{
case 0: /* No arguments. */
break;
- case 1: /* One argument; we already have the type. */
+ case 1: /* One argument; we already have the
+ type and size. */
args_type[specs[cnt].data_arg] = specs[cnt].data_arg_type;
+ args_size[specs[cnt].data_arg] = specs[cnt].size;
break;
default:
/* We have more than one argument for this format spec.
@@ -1751,7 +1740,8 @@ do_positional:
all the types. */
(void) (*__printf_arginfo_table[specs[cnt].info.spec])
(&specs[cnt].info,
- specs[cnt].ndata_args, &args_type[specs[cnt].data_arg]);
+ specs[cnt].ndata_args, &args_type[specs[cnt].data_arg],
+ &args_size[specs[cnt].data_arg]);
break;
}
}
@@ -1766,13 +1756,21 @@ do_positional:
args_value[cnt].mem = va_arg (ap_save, type); \
break
- T (PA_CHAR, pa_int, int); /* Promoted. */
T (PA_WCHAR, pa_wchar, wint_t);
- T (PA_INT|PA_FLAG_SHORT, pa_int, int); /* Promoted. */
+ case PA_CHAR: /* Promoted. */
+ case PA_INT|PA_FLAG_SHORT: /* Promoted. */
+#if LONG_MAX == INT_MAX
+ case PA_INT|PA_FLAG_LONG:
+#endif
T (PA_INT, pa_int, int);
- T (PA_INT|PA_FLAG_LONG, pa_long_int, long int);
+#if LONG_MAX == LONG_LONG_MAX
+ case PA_INT|PA_FLAG_LONG:
+#endif
T (PA_INT|PA_FLAG_LONG_LONG, pa_long_long_int, long long int);
- T (PA_FLOAT, pa_double, double); /* Promoted. */
+#if LONG_MAX != INT_MAX && LONG_MAX != LONG_LONG_MAX
+# error "he?"
+#endif
+ case PA_FLOAT: /* Promoted. */
T (PA_DOUBLE, pa_double, double);
case PA_DOUBLE|PA_FLAG_LONG_DOUBLE:
if (__ldbl_is_dbl)
@@ -1783,13 +1781,20 @@ do_positional:
else
args_value[cnt].pa_long_double = va_arg (ap_save, long double);
break;
- T (PA_STRING, pa_string, const char *);
- T (PA_WSTRING, pa_wstring, const wchar_t *);
+ case PA_STRING: /* All pointers are the same */
+ case PA_WSTRING: /* All pointers are the same */
T (PA_POINTER, pa_pointer, void *);
#undef T
default:
if ((args_type[cnt] & PA_FLAG_PTR) != 0)
args_value[cnt].pa_pointer = va_arg (ap_save, void *);
+ else if (__builtin_expect (__printf_va_arg_table != NULL, 0)
+ && __printf_va_arg_table[args_type[cnt] - PA_LAST] != NULL)
+ {
+ args_value[cnt].pa_user = alloca (args_size[cnt]);
+ (*__printf_va_arg_table[args_type[cnt] - PA_LAST])
+ (args_value[cnt].pa_user, &ap_save);
+ }
else
args_value[cnt].pa_long_double = 0.0;
break;
@@ -1893,6 +1898,40 @@ do_positional:
/* Process format specifiers. */
while (1)
{
+ extern printf_function **__printf_function_table;
+ int function_done;
+
+ if (spec <= UCHAR_MAX
+ && __printf_function_table != NULL
+ && __printf_function_table[(size_t) spec] != NULL)
+ {
+ const void **ptr = alloca (specs[nspecs_done].ndata_args
+ * sizeof (const void *));
+
+ /* Fill in an array of pointers to the argument values. */
+ for (unsigned int i = 0; i < specs[nspecs_done].ndata_args;
+ ++i)
+ ptr[i] = &args_value[specs[nspecs_done].data_arg + i];
+
+ /* Call the function. */
+ function_done = __printf_function_table[(size_t) spec]
+ (s, &specs[nspecs_done].info, ptr);
+
+ if (function_done != -2)
+ {
+ /* If an error occurred we don't have information
+ about # of chars. */
+ if (function_done < 0)
+ {
+ done = -1;
+ goto all_done;
+ }
+
+ done_add (function_done);
+ break;
+ }
+ }
+
JUMP (spec, step4_jumps);
process_arg ((&specs[nspecs_done]));
@@ -1900,19 +1939,9 @@ do_positional:
LABEL (form_unknown):
{
- extern printf_function **__printf_function_table;
- int function_done;
- printf_function *function;
unsigned int i;
const void **ptr;
- function =
- (__printf_function_table == NULL ? NULL :
- __printf_function_table[specs[nspecs_done].info.spec]);
-
- if (function == NULL)
- function = &printf_unknown;
-
ptr = alloca (specs[nspecs_done].ndata_args
* sizeof (const void *));
@@ -1921,7 +1950,8 @@ do_positional:
ptr[i] = &args_value[specs[nspecs_done].data_arg + i];
/* Call the function. */
- function_done = (*function) (s, &specs[nspecs_done].info, ptr);
+ function_done = printf_unknown (s, &specs[nspecs_done].info,
+ ptr);
/* If an error occurred we don't have information about #
of chars. */
diff --git a/libc/string/Makefile b/libc/string/Makefile
index 06697f066..650ff47c0 100644
--- a/libc/string/Makefile
+++ b/libc/string/Makefile
@@ -87,5 +87,5 @@ tests: $(objpfx)tst-svc.out
$(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
$(built-program-cmd) < $(word 1,$^) > $@
- -cmp tst-svc.expect $(objpfx)tst-svc.out
+ @cmp tst-svc.expect $(objpfx)tst-svc.out
# eglibc: endif
diff --git a/libc/string/stratcliff.c b/libc/string/stratcliff.c
index 77fe2bcca..f90616c26 100644
--- a/libc/string/stratcliff.c
+++ b/libc/string/stratcliff.c
@@ -1,5 +1,5 @@
/* Test for string function add boundaries of usable memory.
- Copyright (C) 1996,1997,1999-2002,2003,2007 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999-2003,2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -46,6 +46,7 @@
# define STPNCPY stpncpy
# define MEMCPY memcpy
# define MEMPCPY mempcpy
+# define MEMCHR memchr
#endif
@@ -205,6 +206,37 @@ do_test (void)
}
}
+ /* memchr test */
+ for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
+ {
+ for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
+ {
+ adr[middle] = L('V');
+
+ CHAR *cp = MEMCHR (&adr[outer], L('V'), 3 * size);
+
+ if (cp - &adr[outer] != middle - outer)
+ {
+ printf ("%s flunked for outer = %d, middle = %d\n",
+ STRINGIFY (MEMCHR), outer, middle);
+ result = 1;
+ }
+
+ adr[middle] = L('T');
+ }
+ }
+ for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
+ {
+ CHAR *cp = MEMCHR (&adr[outer], L('V'), nchars - outer);
+
+ if (cp != NULL)
+ {
+ printf ("%s flunked for outer = %d\n",
+ STRINGIFY (MEMCHR), outer);
+ result = 1;
+ }
+ }
+
/* This function only exists for single-byte characters. */
#ifndef WCSTEST
/* rawmemchr test */
diff --git a/libc/string/strverscmp.c b/libc/string/strverscmp.c
index 2b7ebcb8a..7c5be8dd9 100644
--- a/libc/string/strverscmp.c
+++ b/libc/string/strverscmp.c
@@ -74,7 +74,7 @@ __strverscmp (s1, s2)
unsigned char c1 = *p1++;
unsigned char c2 = *p2++;
/* Hint: '0' is a digit too. */
- int state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
+ int state = S_N + ((c1 == '0') + (isdigit (c1) != 0));
int diff;
while ((diff = c1 - c2) == 0)
@@ -85,10 +85,10 @@ __strverscmp (s1, s2)
state = next_state[state];
c1 = *p1++;
c2 = *p2++;
- state |= (c1 == '0') + (isdigit (c1) != 0);
+ state += (c1 == '0') + (isdigit (c1) != 0);
}
- state = result_type[state * 3 | (((c2 == '0') + (isdigit (c2) != 0)))];
+ state = result_type[state * 3 + (((c2 == '0') + (isdigit (c2) != 0)))];
switch (state)
{
diff --git a/libc/string/tst-svc.expect b/libc/string/tst-svc.expect
index bb54a2ace..624011277 100644
--- a/libc/string/tst-svc.expect
+++ b/libc/string/tst-svc.expect
@@ -6,6 +6,8 @@
01a
0
0a
+2.6.20
+2.6.21
2.8
2.8-0.4
20
diff --git a/libc/string/tst-svc.input b/libc/string/tst-svc.input
index fbe06d2c8..247b1c48f 100644
--- a/libc/string/tst-svc.input
+++ b/libc/string/tst-svc.input
@@ -6,6 +6,7 @@
01a
00a
000
+2.6.21
20
212
21
@@ -18,6 +19,7 @@ foo
foo-3.0.0
foo-3.0.1
foo-0.5
+2.6.20
foo-0.4b
foo-3.10
foo-3.2
diff --git a/libc/sysdeps/generic/ldsodefs.h b/libc/sysdeps/generic/ldsodefs.h
index 943369bb2..b1af7fde0 100644
--- a/libc/sysdeps/generic/ldsodefs.h
+++ b/libc/sysdeps/generic/ldsodefs.h
@@ -386,6 +386,8 @@ struct rtld_global
/* Keep track of changes to each namespace' list. */
struct r_debug _ns_debug;
} _dl_ns[DL_NNS];
+ /* One higher than index of last used namespace. */
+ EXTERN size_t _dl_nns;
/* During the program run we must not modify the global data of
loaded shared object simultanously in two threads. Therefore we
@@ -399,11 +401,6 @@ struct rtld_global
/* Incremented whenever something may have been added to dl_loaded. */
EXTERN unsigned long long _dl_load_adds;
-#ifndef MAP_ANON
- /* File descriptor referring to the zero-fill device. */
- EXTERN int _dl_zerofd;
-#endif
-
/* The object to be initialized first. */
EXTERN struct link_map *_dl_initfirst;
diff --git a/libc/sysdeps/posix/preadv.c b/libc/sysdeps/posix/preadv.c
new file mode 100644
index 000000000..e697604c1
--- /dev/null
+++ b/libc/sysdeps/posix/preadv.c
@@ -0,0 +1,108 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <sys/param.h>
+#if __WORDSIZE == 64 && !defined PREADV
+/* Hide the preadv64 declaration. */
+# define preadv64 __redirect_preadv64
+#endif
+#include <sys/uio.h>
+#include <bits/wordsize.h>
+
+#ifndef PREADV
+# define PREADV preadv
+# define PREAD __pread
+# define OFF_T off_t
+#endif
+
+
+static void
+ifree (char **ptrp)
+{
+ free (*ptrp);
+}
+
+
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by VECTOR, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in VECTOR instead
+ of a contiguous buffer. */
+ssize_t
+PREADV (int fd, const struct iovec *vector, int count, OFF_T offset)
+{
+ /* Find the total number of bytes to be read. */
+ size_t bytes = 0;
+ for (int i = 0; i < count; ++i)
+ {
+ /* Check for ssize_t overflow. */
+ if (SSIZE_MAX - bytes < vector[i].iov_len)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ bytes += vector[i].iov_len;
+ }
+
+ /* Allocate a temporary buffer to hold the data. We should normally
+ use alloca since it's faster and does not require synchronization
+ with other threads. But we cannot if the amount of memory
+ required is too large. */
+ char *buffer;
+ char *malloced_buffer __attribute__ ((__cleanup__ (ifree))) = NULL;
+ if (__libc_use_alloca (bytes))
+ buffer = (char *) __alloca (bytes);
+ else
+ {
+ malloced_buffer = buffer = (char *) malloc (bytes);
+ if (buffer == NULL)
+ return -1;
+ }
+
+ /* Read the data. */
+ ssize_t bytes_read = PREAD (fd, buffer, bytes, offset);
+ if (bytes_read <= 0)
+ return -1;
+
+ /* Copy the data from BUFFER into the memory specified by VECTOR. */
+ bytes = bytes_read;
+ for (int i = 0; i < count; ++i)
+ {
+ size_t copy = MIN (vector[i].iov_len, bytes);
+
+ (void) memcpy ((void *) vector[i].iov_base, (void *) buffer, copy);
+
+ buffer += copy;
+ bytes -= copy;
+ if (bytes == 0)
+ break;
+ }
+
+ return bytes_read;
+}
+#if __WORDSIZE == 64 && defined preadv64
+# undef preadv64
+strong_alias (preadv, preadv64)
+#endif
diff --git a/libc/sysdeps/posix/preadv64.c b/libc/sysdeps/posix/preadv64.c
new file mode 100644
index 000000000..198622353
--- /dev/null
+++ b/libc/sysdeps/posix/preadv64.c
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# define PREADV preadv64
+# define PREAD __pread64
+# define OFF_T off64_t
+
+# include "preadv.c"
+#endif
diff --git a/libc/sysdeps/posix/pwritev.c b/libc/sysdeps/posix/pwritev.c
new file mode 100644
index 000000000..0b6627dc9
--- /dev/null
+++ b/libc/sysdeps/posix/pwritev.c
@@ -0,0 +1,108 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <sys/param.h>
+#if __WORDSIZE == 64 && !defined PWRITEV
+/* Hide the pwritev64 declaration. */
+# define pwritev64 __redirect_pwritev64
+#endif
+#include <sys/uio.h>
+#include <bits/wordsize.h>
+
+#ifndef PWRITEV
+# define PWRITEV pwritev
+# define PWRITE __pwrite
+# define OFF_T off_t
+#endif
+
+
+static void
+ifree (char **ptrp)
+{
+ free (*ptrp);
+}
+
+
+/* Read data from file descriptor FD at the given position OFFSET
+ without change the file pointer, and put the result in the buffers
+ described by VECTOR, which is a vector of COUNT 'struct iovec's.
+ The buffers are filled in the order specified. Operates just like
+ 'read' (see <unistd.h>) except that data are put in VECTOR instead
+ of a contiguous buffer. */
+ssize_t
+PWRITEV (int fd, const struct iovec *vector, int count, OFF_T offset)
+{
+ /* Find the total number of bytes to be read. */
+ size_t bytes = 0;
+ for (int i = 0; i < count; ++i)
+ {
+ /* Check for ssize_t overflow. */
+ if (SSIZE_MAX - bytes < vector[i].iov_len)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ bytes += vector[i].iov_len;
+ }
+
+ /* Allocate a temporary buffer to hold the data. We should normally
+ use alloca since it's faster and does not require synchronization
+ with other threads. But we cannot if the amount of memory
+ required is too large. */
+ char *buffer;
+ char *malloced_buffer __attribute__ ((__cleanup__ (ifree))) = NULL;
+ if (__libc_use_alloca (bytes))
+ buffer = (char *) __alloca (bytes);
+ else
+ {
+ malloced_buffer = buffer = (char *) malloc (bytes);
+ if (buffer == NULL)
+ return -1;
+ }
+
+ /* Read the data. */
+ ssize_t bytes_read = PWRITE (fd, buffer, bytes, offset);
+ if (bytes_read <= 0)
+ return -1;
+
+ /* Copy the data from BUFFER into the memory specified by VECTOR. */
+ bytes = bytes_read;
+ for (int i = 0; i < count; ++i)
+ {
+ size_t copy = MIN (vector[i].iov_len, bytes);
+
+ (void) memcpy ((void *) vector[i].iov_base, (void *) buffer, copy);
+
+ buffer += copy;
+ bytes -= copy;
+ if (bytes == 0)
+ break;
+ }
+
+ return bytes_read;
+}
+#if __WORDSIZE == 64 && defined pwritev64
+# undef pwritev64
+strong_alias (pwritev, pwritev64)
+#endif
diff --git a/libc/sysdeps/posix/pwritev64.c b/libc/sysdeps/posix/pwritev64.c
new file mode 100644
index 000000000..4948d2efe
--- /dev/null
+++ b/libc/sysdeps/posix/pwritev64.c
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# define PWRITEV pwritev64
+# define PWRITE __pwrite64
+# define OFF_T off64_t
+
+# include "pwritev.c"
+#endif
diff --git a/libc/sysdeps/posix/readv.c b/libc/sysdeps/posix/readv.c
index f0e78e666..50bcc9131 100644
--- a/libc/sysdeps/posix/readv.c
+++ b/libc/sysdeps/posix/readv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996,1997,2002,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,24 +25,24 @@
#include <sys/uio.h>
#include <errno.h>
+
+static void
+ifree (char **ptrp)
+{
+ free (*ptrp);
+}
+
/* Read data from file descriptor FD, and put the result in the
- buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
+ buffers described by VECTOR, which is a vector of COUNT 'struct iovec's.
The buffers are filled in the order specified.
- Operates just like `read' (see <unistd.h>) except that data are
+ Operates just like 'read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
__libc_readv (int fd, const struct iovec *vector, int count)
{
- char *buffer;
- char *buffer_start;
- size_t bytes;
- ssize_t bytes_read;
- int i;
- bool use_malloc = false;
-
/* Find the total number of bytes to be read. */
- bytes = 0;
- for (i = 0; i < count; ++i)
+ size_t bytes = 0;
+ for (int i = 0; i < count; ++i)
{
/* Check for ssize_t overflow. */
if (SSIZE_MAX - bytes < vector[i].iov_len)
@@ -57,28 +57,25 @@ __libc_readv (int fd, const struct iovec *vector, int count)
use alloca since it's faster and does not require synchronization
with other threads. But we cannot if the amount of memory
required is too large. */
+ char *buffer;
+ char *malloced_buffer __attribute__ ((__cleanup__ (ifree))) = NULL;
if (__libc_use_alloca (bytes))
buffer = (char *) __alloca (bytes);
else
{
- buffer = (char *) malloc (bytes);
+ malloced_buffer = buffer = (char *) malloc (bytes);
if (buffer == NULL)
- /* XXX I don't know whether it is acceptable to try reading
- the data in chunks. Probably not so we just fail here. */
return -1;
-
- use_malloc = true;
}
/* Read the data. */
- bytes_read = __read (fd, buffer, bytes);
+ ssize_t bytes_read = __read (fd, buffer, bytes);
if (bytes_read <= 0)
return -1;
/* Copy the data from BUFFER into the memory specified by VECTOR. */
bytes = bytes_read;
- buffer_start = buffer;
- for (i = 0; i < count; ++i)
+ for (int i = 0; i < count; ++i)
{
size_t copy = MIN (vector[i].iov_len, bytes);
@@ -90,9 +87,6 @@ __libc_readv (int fd, const struct iovec *vector, int count)
break;
}
- if (use_malloc)
- free (buffer_start);
-
return bytes_read;
}
#ifndef __libc_readv
diff --git a/libc/sysdeps/posix/writev.c b/libc/sysdeps/posix/writev.c
index a347cc2ea..203cf9ceb 100644
--- a/libc/sysdeps/posix/writev.c
+++ b/libc/sysdeps/posix/writev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996,1997,2002,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,24 +25,25 @@
#include <sys/uio.h>
#include <errno.h>
+
+static void
+ifree (char **ptrp)
+{
+ free (*ptrp);
+}
+
+
/* Write data pointed by the buffers described by VECTOR, which
- is a vector of COUNT `struct iovec's, to file descriptor FD.
+ is a vector of COUNT 'struct iovec's, to file descriptor FD.
The data is written in the order specified.
- Operates just like `write' (see <unistd.h>) except that the data
+ Operates just like 'write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
ssize_t
__libc_writev (int fd, const struct iovec *vector, int count)
{
- char *buffer;
- register char *bp;
- size_t bytes, to_copy;
- ssize_t bytes_written;
- int i;
- bool use_malloc = false;
-
/* Find the total number of bytes to be written. */
- bytes = 0;
- for (i = 0; i < count; ++i)
+ size_t bytes = 0;
+ for (int i = 0; i < count; ++i)
{
/* Check for ssize_t overflow. */
if (SSIZE_MAX - bytes < vector[i].iov_len)
@@ -57,23 +58,23 @@ __libc_writev (int fd, const struct iovec *vector, int count)
use alloca since it's faster and does not require synchronization
with other threads. But we cannot if the amount of memory
required is too large. */
+ char *buffer;
+ char *malloced_buffer __attribute__ ((__cleanup__ (ifree))) = NULL;
if (__libc_use_alloca (bytes))
buffer = (char *) __alloca (bytes);
else
{
- buffer = (char *) malloc (bytes);
+ malloced_buffer = buffer = (char *) malloc (bytes);
if (buffer == NULL)
/* XXX I don't know whether it is acceptable to try writing
the data in chunks. Probably not so we just fail here. */
return -1;
-
- use_malloc = true;
}
/* Copy the data into BUFFER. */
- to_copy = bytes;
- bp = buffer;
- for (i = 0; i < count; ++i)
+ size_t to_copy = bytes;
+ char *bp = buffer;
+ for (int i = 0; i < count; ++i)
{
size_t copy = MIN (vector[i].iov_len, to_copy);
@@ -84,10 +85,7 @@ __libc_writev (int fd, const struct iovec *vector, int count)
break;
}
- bytes_written = __write (fd, buffer, bytes);
-
- if (use_malloc)
- free (buffer);
+ ssize_t bytes_written = __write (fd, buffer, bytes);
return bytes_written;
}
diff --git a/libc/sysdeps/unix/sysv/linux/bits/socket.h b/libc/sysdeps/unix/sysv/linux/bits/socket.h
index 72c7335ae..88062e59a 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/socket.h
@@ -95,15 +95,20 @@ enum __socket_type
#define PF_ASH 18 /* Ash. */
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_MAX 35 /* For now.. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_MAX 36 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -130,14 +135,19 @@ enum __socket_type
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/libc/sysdeps/unix/sysv/linux/kernel-features.h b/libc/sysdeps/unix/sysv/linux/kernel-features.h
index 29afe2771..5478ce670 100644
--- a/libc/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/libc/sysdeps/unix/sysv/linux/kernel-features.h
@@ -462,6 +462,13 @@
# define __ASSUME_SET_ROBUST_LIST 1
#endif
+/* Pessimistically assume that 2.6.18 introduced real handling of
+ large numbers of requests to readv and writev and that we don't
+ need a fallback. It likely worked for much longer. */
+#if __LINUX_KERNEL_VERSION >= 0x020612
+# define __ASSUME_COMPLETE_READV_WRITEV 1
+#endif
+
/* Support for PI futexes was added in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 0x020612
# define __ASSUME_FUTEX_LOCK_PI 1
@@ -522,3 +529,11 @@
#if __LINUX_KERNEL_VERSION >= 0x02061d
# define __ASSUME_FUTEX_CLOCK_REALTIME 1
#endif
+
+/* Support for preadv and pwritev was added in 2.6.30. */
+#if __LINUX_KERNEL_VERSION >= 0x02061e \
+ && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
+ || defined __ia64__ || defined __sparc__)
+# define __ASSUME_PREADV 1
+# define __ASSUME_PWRITEV 1
+#endif
diff --git a/libc/sysdeps/unix/sysv/linux/preadv.c b/libc/sysdeps/unix/sysv/linux/preadv.c
new file mode 100644
index 000000000..0d4a6c380
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/preadv.c
@@ -0,0 +1,93 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/param.h>
+#if __WORDSIZE == 64
+/* Hide the preadv64 declaration. */
+# define preadv64 __redirect_preadv64
+#endif
+#include <sys/uio.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <kernel-features.h>
+
+
+#ifndef PREADV
+# define PREADV preadv
+# define PREADV_REPLACEMENT __atomic_preadv_replacement
+# define PREAD __pread
+# define OFF_T off_t
+#endif
+
+#ifndef __ASSUME_PREADV
+static ssize_t PREADV_REPLACEMENT (int, __const struct iovec *,
+ int, OFF_T) internal_function;
+#endif
+
+
+ssize_t
+PREADV (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ OFF_T offset;
+{
+#ifdef __NR_preadv
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
+ else
+ {
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
+
+ LIBC_CANCEL_RESET (oldtype);
+ }
+# ifdef __ASSUME_PREADV
+ return result;
+# endif
+#endif
+
+#ifndef __ASSUME_PREADV
+# ifdef __NR_preadv
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+# endif
+
+ return PREADV_REPLACEMENT (fd, vector, count, offset);
+#endif
+}
+#if __WORDSIZE == 64
+# undef preadv64
+strong_alias (preadv, preadv64)
+#endif
+
+#ifndef __ASSUME_PREADV
+# undef PREADV
+# define PREADV static internal_function PREADV_REPLACEMENT
+# include <sysdeps/posix/preadv.c>
+#endif
diff --git a/libc/sysdeps/unix/sysv/linux/preadv64.c b/libc/sysdeps/unix/sysv/linux/preadv64.c
new file mode 100644
index 000000000..936ff1426
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/preadv64.c
@@ -0,0 +1,6 @@
+#define PREADV preadv64
+#define PREADV_REPLACEMENT __atomic_preadv64_replacement
+#define PREAD __libc_pread64
+#define OFF_T off64_t
+
+#include "preadv.c"
diff --git a/libc/sysdeps/unix/sysv/linux/pwritev.c b/libc/sysdeps/unix/sysv/linux/pwritev.c
new file mode 100644
index 000000000..5c30eae51
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/pwritev.c
@@ -0,0 +1,93 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/param.h>
+#if __WORDSIZE == 64 && !defined PWRITEV
+/* Hide the pwritev64 declaration. */
+# define pwritev64 __redirect_pwritev64
+#endif
+#include <sys/uio.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <kernel-features.h>
+
+
+#ifndef PWRITEV
+# define PWRITEV pwritev
+# define PWRITEV_REPLACEMENT __atomic_pwritev_replacement
+# define PWRITE __pwrite
+# define OFF_T off_t
+#endif
+
+#ifndef __ASSUME_PWRITEV
+static ssize_t PWRITEV_REPLACEMENT (int, __const struct iovec *,
+ int, OFF_T) internal_function;
+#endif
+
+
+ssize_t
+PWRITEV (fd, vector, count, offset)
+ int fd;
+ const struct iovec *vector;
+ int count;
+ OFF_T offset;
+{
+#ifdef __NR_pwritev
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
+ else
+ {
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
+
+ LIBC_CANCEL_RESET (oldtype);
+ }
+# ifdef __ASSUME_PWRITEV
+ return result;
+# endif
+#endif
+
+#ifndef __ASSUME_PWRITEV
+# ifdef __NR_pwritev
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+# endif
+
+ return PWRITEV_REPLACEMENT (fd, vector, count, offset);
+#endif
+}
+#if __WORDSIZE == 64 && defined pwritev64
+# undef pwritev64
+strong_alias (pwritev, pwritev64)
+#endif
+
+#ifndef __ASSUME_PWRITEV
+# undef PWRITEV
+# define PWRITEV static internal_function PWRITEV_REPLACEMENT
+# include <sysdeps/posix/pwritev.c>
+#endif
diff --git a/libc/sysdeps/unix/sysv/linux/pwritev64.c b/libc/sysdeps/unix/sysv/linux/pwritev64.c
new file mode 100644
index 000000000..1e8168f10
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/pwritev64.c
@@ -0,0 +1,6 @@
+#define PWRITEV pwritev64
+#define PWRITEV_REPLACEMENT __atomic_pwritev64_replacement
+#define PWRITE __pwrite64
+#define OFF_T off64_t
+
+#include "pwritev.c"
diff --git a/libc/sysdeps/unix/sysv/linux/readv.c b/libc/sysdeps/unix/sysv/linux/readv.c
index 250c00a07..bff4a3ff7 100644
--- a/libc/sysdeps/unix/sysv/linux/readv.c
+++ b/libc/sysdeps/unix/sysv/linux/readv.c
@@ -1,5 +1,5 @@
/* readv supports all Linux kernels >= 2.0.
- Copyright (C) 1997,1998,2000,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2002,2003,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,7 @@
#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
+#include <kernel-features.h>
static ssize_t __atomic_readv_replacement (int, __const struct iovec *,
int) internal_function;
@@ -36,41 +37,38 @@ static ssize_t __atomic_readv_replacement (int, __const struct iovec *,
#endif
-/* We should deal with kernel which have a smaller UIO_FASTIOV as well
- as a very big count. */
-static ssize_t
-do_readv (int fd, const struct iovec *vector, int count)
-{
- ssize_t bytes_read;
-
- bytes_read = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
-
- if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- return bytes_read;
-
- return __atomic_readv_replacement (fd, vector, count);
-}
-
-
ssize_t
__libc_readv (fd, vector, count)
int fd;
const struct iovec *vector;
int count;
{
- if (SINGLE_THREAD_P)
- return do_readv (fd, vector, count);
+ ssize_t result;
- int oldtype = LIBC_CANCEL_ASYNC ();
+ if (SINGLE_THREAD_P)
+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
+ else
+ {
+ int oldtype = LIBC_CANCEL_ASYNC ();
- int result = do_readv (fd, vector, count);
+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
- LIBC_CANCEL_RESET (oldtype);
+ LIBC_CANCEL_RESET (oldtype);
+ }
+#ifdef __ASSUME_COMPLETE_READV_WRITEV
return result;
+#else
+ if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
+ return result;
+
+ return __atomic_readv_replacement (fd, vector, count);
+#endif
}
strong_alias (__libc_readv, __readv)
weak_alias (__libc_readv, readv)
-#define __libc_readv static internal_function __atomic_readv_replacement
-#include <sysdeps/posix/readv.c>
+#ifndef __ASSUME_COMPLETE_READV_WRITEV
+# define __libc_readv static internal_function __atomic_readv_replacement
+# include <sysdeps/posix/readv.c>
+#endif
diff --git a/libc/sysdeps/unix/sysv/linux/sys/eventfd.h b/libc/sysdeps/unix/sysv/linux/sys/eventfd.h
index 7c6cf7196..d942df4bf 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/eventfd.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/eventfd.h
@@ -28,6 +28,8 @@ typedef uint64_t eventfd_t;
/* Flags for signalfd. */
enum
{
+ EFD_SEMAPHORE = 1,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
EFD_CLOEXEC = 02000000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 04000
diff --git a/libc/sysdeps/unix/sysv/linux/wordsize-64/preadv64.c b/libc/sysdeps/unix/sysv/linux/wordsize-64/preadv64.c
new file mode 100644
index 000000000..fd9320cfc
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/wordsize-64/preadv64.c
@@ -0,0 +1 @@
+/* Empty since the preadv syscall is equivalent. */
diff --git a/libc/sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c b/libc/sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c
new file mode 100644
index 000000000..8b72a2928
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c
@@ -0,0 +1 @@
+/* Empty since the pwritev syscall is equivalent. */
diff --git a/libc/sysdeps/unix/sysv/linux/writev.c b/libc/sysdeps/unix/sysv/linux/writev.c
index 05978665f..55e915d34 100644
--- a/libc/sysdeps/unix/sysv/linux/writev.c
+++ b/libc/sysdeps/unix/sysv/linux/writev.c
@@ -1,5 +1,5 @@
/* writev supports all Linux kernels >= 2.0.
- Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2002,2003,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,7 @@
#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
+#include <kernel-features.h>
static ssize_t __atomic_writev_replacement (int, const struct iovec *,
int) internal_function;
@@ -36,40 +37,38 @@ static ssize_t __atomic_writev_replacement (int, const struct iovec *,
#endif
-/* We should deal with kernel which have a smaller UIO_FASTIOV as well
- as a very big count. */
-static ssize_t
-do_writev (int fd, const struct iovec *vector, int count)
-{
- ssize_t bytes_written;
-
- bytes_written = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
-
- if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- return bytes_written;
-
- return __atomic_writev_replacement (fd, vector, count);
-}
-
ssize_t
__libc_writev (fd, vector, count)
int fd;
const struct iovec *vector;
int count;
{
- if (SINGLE_THREAD_P)
- return do_writev (fd, vector, count);
+ ssize_t result;
- int oldtype = LIBC_CANCEL_ASYNC ();
+ if (SINGLE_THREAD_P)
+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
+ else
+ {
+ int oldtype = LIBC_CANCEL_ASYNC ();
- ssize_t result = do_writev (fd, vector, count);
+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
- LIBC_CANCEL_RESET (oldtype);
+ LIBC_CANCEL_RESET (oldtype);
+ }
+#ifdef __ASSUME_COMPLETE_READV_WRITEV
return result;
+#else
+ if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
+ return result;
+
+ return __atomic_writev_replacement (fd, vector, count);
+#endif
}
strong_alias (__libc_writev, __writev)
weak_alias (__libc_writev, writev)
-#define __libc_writev static internal_function __atomic_writev_replacement
-#include <sysdeps/posix/writev.c>
+#ifndef __ASSUME_COMPLETE_READV_WRITEV
+# define __libc_writev static internal_function __atomic_writev_replacement
+# include <sysdeps/posix/writev.c>
+#endif
diff --git a/libc/sysdeps/x86_64/memchr.S b/libc/sysdeps/x86_64/memchr.S
new file mode 100644
index 000000000..09ba6d4f8
--- /dev/null
+++ b/libc/sysdeps/x86_64/memchr.S
@@ -0,0 +1,66 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@redhat.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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+
+ .text
+ENTRY (memchr)
+ movd %esi, %xmm1
+ movq %rdi, %rcx
+ punpcklbw %xmm1, %xmm1
+ andq $~15, %rdi
+ punpcklbw %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ subq %rdi, %rcx
+ pcmpeqb %xmm1, %xmm0
+ addq %rcx, %rdx
+ shl %cl, %esi
+ pmovmskb %xmm0, %ecx
+ andl %esi, %ecx
+ movl $16, %esi
+ jnz 1f
+ cmpq %rsi, %rdx
+ jle 3f
+
+2: movdqa (%rdi,%rsi), %xmm0
+ leaq 16(%rsi), %rsi
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %ecx
+ testl %ecx, %ecx
+ jnz 1f
+ cmpq %rsi, %rdx
+ jg 2b
+
+3: xorl %eax, %eax
+ ret
+
+1: leaq -16(%rdi,%rsi), %rax
+ bsfl %ecx, %ecx
+ addq %rcx, %rax
+ leaq -16(%rsi,%rcx), %rsi
+ cmpq %rsi, %rdx
+ jle 3b
+ ret
+END (memchr)
+
+strong_alias (memchr, __memchr)
+libc_hidden_builtin_def (memchr)
diff --git a/libc/sysdeps/x86_64/rawmemchr.S b/libc/sysdeps/x86_64/rawmemchr.S
new file mode 100644
index 000000000..c3bd77163
--- /dev/null
+++ b/libc/sysdeps/x86_64/rawmemchr.S
@@ -0,0 +1,54 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@redhat.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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+
+ .text
+ENTRY (rawmemchr)
+ movd %esi, %xmm1
+ movq %rdi, %rcx
+ punpcklbw %xmm1, %xmm1
+ andq $~15, %rdi
+ punpcklbw %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ subq %rdi, %rcx
+ pcmpeqb %xmm1, %xmm0
+ shl %cl, %esi
+ pmovmskb %xmm0, %ecx
+ leaq 16(%rdi), %rdi
+ andl %esi, %ecx
+ jnz 1f
+
+2: movdqa (%rdi), %xmm0
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %ecx
+ testl %ecx, %ecx
+ jz 2b
+
+1: bsfl %ecx, %ecx
+ leaq -16(%rcx,%rdi), %rax
+ ret
+END (rawmemchr)
+
+strong_alias (rawmemchr, __rawmemchr)
+libc_hidden_builtin_def (__rawmemchr)
diff --git a/libc/sysdeps/x86_64/strchr.S b/libc/sysdeps/x86_64/strchr.S
index 893469797..8833cd0cc 100644
--- a/libc/sysdeps/x86_64/strchr.S
+++ b/libc/sysdeps/x86_64/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For AMD x86-64.
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2009 Free Software 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,273 +19,52 @@
02111-1307 USA. */
#include <sysdep.h>
-#include "asm-syntax.h"
-#include "bp-sym.h"
-#include "bp-asm.h"
.text
-ENTRY (BP_SYM (strchr))
-
- /* Before we start with the main loop we process single bytes
- until the source pointer is aligned. This has two reasons:
- 1. aligned 64-bit memory access is faster
- and (more important)
- 2. we process in the main loop 64 bit in one step although
- we don't know the end of the string. But accessing at
- 8-byte alignment guarantees that we never access illegal
- memory if this would not also be done by the trivial
- implementation (this is because all processor inherent
- boundaries are multiples of 8). */
-
- movq %rdi, %rdx
- andl $7, %edx /* Mask alignment bits */
- movq %rdi, %rax /* duplicate destination. */
- jz 1f /* aligned => start loop */
- neg %edx
- addl $8, %edx /* Align to 8 bytes. */
-
- /* Search the first bytes directly. */
-0: movb (%rax), %cl /* load byte */
- cmpb %cl,%sil /* compare byte. */
- je 6f /* target found */
- testb %cl,%cl /* is byte NUL? */
- je 7f /* yes => return NULL */
- incq %rax /* increment pointer */
- decl %edx
- jnz 0b
-
-
-1:
- /* At the moment %rsi contains C. What we need for the
- algorithm is C in all bytes of the register. Avoid
- operations on 16 bit words because these require an
- prefix byte (and one more cycle). */
- /* Populate 8 bit data to full 64-bit. */
- movabs $0x0101010101010101,%r9
- movzbl %sil,%edx
- imul %rdx,%r9
-
- movq $0xfefefefefefefeff, %r8 /* Save magic. */
-
- /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
- change any of the hole bits of LONGWORD.
-
- 1) Is this safe? Will it catch all the zero bytes?
- Suppose there is a byte with all zeros. Any carry bits
- propagating from its left will fall into the hole at its
- least significant bit and stop. Since there will be no
- carry from its most significant bit, the LSB of the
- byte to the left will be unchanged, and the zero will be
- detected.
-
- 2) Is this worthwhile? Will it ignore everything except
- zero bytes? Suppose every byte of QUARDWORD has a bit set
- somewhere. There will be a carry into bit 8. If bit 8
- is set, this will carry into bit 16. If bit 8 is clear,
- one of bits 9-15 must be set, so there will be a carry
- into bit 16. Similarly, there will be a carry into bit
- 24 tec.. If one of bits 54-63 is set, there will be a carry
- into bit 64 (=carry flag), so all of the hole bits will
- be changed.
-
- 3) But wait! Aren't we looking for C, not zero?
- Good point. So what we do is XOR LONGWORD with a longword,
- each of whose bytes is C. This turns each byte that is C
- into a zero. */
-
- .p2align 4
-4:
- /* Main Loop is unrolled 4 times. */
- /* First unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- xorq %r9, %rcx /* XOR with qword c|...|c => bytes of str == c
- are now 0 */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found c => return pointer */
-
- /* The quadword we looked at does not contain the value we're looking
- for. Let's search now whether we have reached the end of the
- string. */
- xorq %r9, %rcx /* restore original dword without reload */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 7f /* highest byte is NUL => return NULL */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 7f /* found NUL => return NULL */
-
- /* Second unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- xorq %r9, %rcx /* XOR with qword c|...|c => bytes of str == c
- are now 0 */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found c => return pointer */
-
- /* The quadword we looked at does not contain the value we're looking
- for. Let's search now whether we have reached the end of the
- string. */
- xorq %r9, %rcx /* restore original dword without reload */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 7f /* highest byte is NUL => return NULL */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 7f /* found NUL => return NULL */
- /* Third unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- xorq %r9, %rcx /* XOR with qword c|...|c => bytes of str == c
- are now 0 */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found c => return pointer */
-
- /* The quadword we looked at does not contain the value we're looking
- for. Let's search now whether we have reached the end of the
- string. */
- xorq %r9, %rcx /* restore original dword without reload */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 7f /* highest byte is NUL => return NULL */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 7f /* found NUL => return NULL */
- /* Fourth unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- xorq %r9, %rcx /* XOR with qword c|...|c => bytes of str == c
- are now 0 */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found c => return pointer */
-
- /* The quadword we looked at does not contain the value we're looking
- for. Let's search now whether we have reached the end of the
- string. */
- xorq %r9, %rcx /* restore original dword without reload */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 7f /* highest byte is NUL => return NULL */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jz 4b /* no NUL found => restart loop */
-
-
-7: /* Return NULL. */
- xorl %eax, %eax
- retq
-
-
- /* We now scan for the byte in which the character was matched.
- But we have to take care of the case that a NUL char is
- found before this in the dword. Note that we XORed %rcx
- with the byte we're looking for, therefore the tests below look
- reversed. */
-
-
- .p2align 4 /* Align, it's a jump target. */
-3: movq %r9,%rdx /* move to %rdx so that we can access bytes */
- subq $8,%rax /* correct pointer increment. */
- testb %cl, %cl /* is first byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %cl /* is first byte NUL? */
- je 7b /* yes => return NULL */
- incq %rax /* increment pointer */
-
- testb %ch, %ch /* is second byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %ch /* is second byte NUL? */
- je 7b /* yes => return NULL? */
- incq %rax /* increment pointer */
-
- shrq $16, %rcx /* make upper bytes accessible */
- testb %cl, %cl /* is third byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %cl /* is third byte NUL? */
- je 7b /* yes => return NULL */
- incq %rax /* increment pointer */
-
- testb %ch, %ch /* is fourth byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %ch /* is fourth byte NUL? */
- je 7b /* yes => return NULL? */
- incq %rax /* increment pointer */
-
- shrq $16, %rcx /* make upper bytes accessible */
- testb %cl, %cl /* is fifth byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %cl /* is fifth byte NUL? */
- je 7b /* yes => return NULL */
- incq %rax /* increment pointer */
-
- testb %ch, %ch /* is sixth byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %ch /* is sixth byte NUL? */
- je 7b /* yes => return NULL? */
- incq %rax /* increment pointer */
-
- shrq $16, %rcx /* make upper bytes accessible */
- testb %cl, %cl /* is seventh byte C? */
- jz 6f /* yes => return pointer */
- cmpb %dl, %cl /* is seventh byte NUL? */
- je 7b /* yes => return NULL */
-
- /* It must be in the eigth byte and it cannot be NUL. */
- incq %rax
-
-6:
- nop
- retq
-END (BP_SYM (strchr))
-
-weak_alias (BP_SYM (strchr), BP_SYM (index))
+ENTRY (strchr)
+ movd %esi, %xmm1
+ movq %rdi, %rcx
+ punpcklbw %xmm1, %xmm1
+ andq $~15, %rdi
+ pxor %xmm2, %xmm2
+ punpcklbw %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ subq %rdi, %rcx
+ movdqa %xmm0, %xmm3
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ shl %cl, %esi
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ andl %esi, %edx
+ andl %esi, %ecx
+ orl %edx, %ecx
+ jnz 1f
+
+2: movdqa (%rdi), %xmm0
+ leaq 16(%rdi), %rdi
+ movdqa %xmm0, %xmm3
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ orl %edx, %ecx
+ jz 2b
+
+1: bsfl %edx, %edx
+ jz 4f
+ bsfl %ecx, %ecx
+ leaq -16(%rdi,%rdx), %rax
+ cmpl %edx, %ecx
+ je 5f
+4: xorl %eax, %eax
+5: ret
+END (strchr)
+
+weak_alias (strchr, index)
libc_hidden_builtin_def (strchr)
+
diff --git a/libc/sysdeps/x86_64/strchrnul.S b/libc/sysdeps/x86_64/strchrnul.S
new file mode 100644
index 000000000..576027a38
--- /dev/null
+++ b/libc/sysdeps/x86_64/strchrnul.S
@@ -0,0 +1,63 @@
+/* strchrnul (str, ch) -- Return pointer to first occurrence of CH in STR
+ or terminating NUL byte.
+ For AMD x86-64.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+
+ .text
+ENTRY (__strchrnul)
+ movd %esi, %xmm1
+ movq %rdi, %rcx
+ punpcklbw %xmm1, %xmm1
+ andq $~15, %rdi
+ pxor %xmm2, %xmm2
+ punpcklbw %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ subq %rdi, %rcx
+ movdqa %xmm0, %xmm3
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ shl %cl, %esi
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ orl %edx, %ecx
+ andl %esi, %ecx
+ jnz 1f
+
+2: movdqa (%rdi), %xmm0
+ leaq 16(%rdi), %rdi
+ movdqa %xmm0, %xmm3
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ orl %edx, %ecx
+ jz 2b
+
+1: bsfl %ecx, %edx
+ leaq -16(%rdi,%rdx), %rax
+ ret
+END (__strchrnul)
+
+weak_alias (__strchrnul, strchrnul)
diff --git a/libc/sysdeps/x86_64/strlen.S b/libc/sysdeps/x86_64/strlen.S
index fd950edaa..86bb8a50a 100644
--- a/libc/sysdeps/x86_64/strlen.S
+++ b/libc/sysdeps/x86_64/strlen.S
@@ -1,6 +1,6 @@
/* strlen(str) -- determine the length of the string STR.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- Based on i486 version contributed by Ulrich Drepper <drepper@redhat.com>.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@redhat.com>.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,121 +19,36 @@
02111-1307 USA. */
#include <sysdep.h>
-#include "asm-syntax.h"
-#include "bp-sym.h"
-#include "bp-asm.h"
.text
-ENTRY (strlen)
- movq %rdi, %rcx /* Duplicate source pointer. */
- andl $7, %ecx /* mask alignment bits */
- movq %rdi, %rax /* duplicate destination. */
- jz 1f /* aligned => start loop */
-
- neg %ecx /* We need to align to 8 bytes. */
- addl $8,%ecx
- /* Search the first bytes directly. */
-0: cmpb $0x0,(%rax) /* is byte NUL? */
- je 2f /* yes => return */
- incq %rax /* increment pointer */
- decl %ecx
- jnz 0b
-
-1: movq $0xfefefefefefefeff,%r8 /* Save magic. */
-
- .p2align 4 /* Align loop. */
-4: /* Main Loop is unrolled 4 times. */
- /* First unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found NUL => return pointer */
-
- /* Second unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found NUL => return pointer */
-
- /* Third unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jnz 3f /* found NUL => return pointer */
-
- /* Fourth unroll. */
- movq (%rax), %rcx /* get double word (= 8 bytes) in question */
- addq $8,%rax /* adjust pointer for next word */
- movq %r8, %rdx /* magic value */
- addq %rcx, %rdx /* add the magic value to the word. We get
- carry bits reported for each byte which
- is *not* 0 */
- jnc 3f /* highest byte is NUL => return pointer */
- xorq %rcx, %rdx /* (word+magic)^word */
- orq %r8, %rdx /* set all non-carry bits */
- incq %rdx /* add 1: if one carry bit was *not* set
- the addition will not result in 0. */
- jz 4b /* no NUL found => continue loop */
-
- .p2align 4 /* Align, it's a jump target. */
-3: subq $8,%rax /* correct pointer increment. */
-
- testb %cl, %cl /* is first byte NUL? */
- jz 2f /* yes => return */
- incq %rax /* increment pointer */
-
- testb %ch, %ch /* is second byte NUL? */
- jz 2f /* yes => return */
- incq %rax /* increment pointer */
-
- testl $0x00ff0000, %ecx /* is third byte NUL? */
- jz 2f /* yes => return pointer */
- incq %rax /* increment pointer */
-
- testl $0xff000000, %ecx /* is fourth byte NUL? */
- jz 2f /* yes => return pointer */
- incq %rax /* increment pointer */
-
- shrq $32, %rcx /* look at other half. */
-
- testb %cl, %cl /* is first byte NUL? */
- jz 2f /* yes => return */
- incq %rax /* increment pointer */
-
- testb %ch, %ch /* is second byte NUL? */
- jz 2f /* yes => return */
- incq %rax /* increment pointer */
-
- testl $0xff0000, %ecx /* is third byte NUL? */
- jz 2f /* yes => return pointer */
- incq %rax /* increment pointer */
-2:
- subq %rdi, %rax /* compute difference to string start */
+ENTRY(strlen)
+ movq %rdi, %rcx
+ movq %rdi, %r8
+ andq $~15, %rdi
+ pxor %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ subq %rdi, %rcx
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ shl %cl, %esi
+ pmovmskb %xmm0, %edx
+ xorl %eax, %eax
+ negq %r8
+ andl %esi, %edx
+ jnz 1f
+
+2: movdqa (%rdi), %xmm0
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %edx
+ testl %edx, %edx
+ jz 2b
+
+1: leaq -16(%rdi,%r8), %rdi
+ bsfl %edx, %eax
+ addq %rdi, %rax
ret
-END (strlen)
+END(strlen)
libc_hidden_builtin_def (strlen)
diff --git a/libc/sysdeps/x86_64/strrchr.S b/libc/sysdeps/x86_64/strrchr.S
new file mode 100644
index 000000000..c75b485ca
--- /dev/null
+++ b/libc/sysdeps/x86_64/strrchr.S
@@ -0,0 +1,81 @@
+/* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR.
+ For AMD x86-64.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+
+ .text
+ENTRY (strrchr)
+ movd %esi, %xmm1
+ movq %rdi, %rcx
+ punpcklbw %xmm1, %xmm1
+ andq $~15, %rdi
+ pxor %xmm2, %xmm2
+ punpcklbw %xmm1, %xmm1
+ orl $0xffffffff, %esi
+ movdqa (%rdi), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ subq %rdi, %rcx
+ movdqa %xmm0, %xmm3
+ leaq 16(%rdi), %rdi
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ shl %cl, %esi
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ andl %esi, %edx
+ andl %esi, %ecx
+ xorl %eax, %eax
+ movl %edx, %esi
+ orl %ecx, %esi
+ jnz 1f
+
+2: movdqa (%rdi), %xmm0
+ leaq 16(%rdi), %rdi
+ movdqa %xmm0, %xmm3
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm3
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm3, %ecx
+ movl %edx, %esi
+ orl %ecx, %esi
+ jz 2b
+
+1: bsfl %ecx, %r9d
+ movl $0xffffffff, %r8d
+ movl $31, %ecx
+ jnz 5f
+
+ bsrl %edx, %edx
+ jz 2b
+ leaq -16(%rdi,%rdx), %rax
+ jmp 2b
+
+5: subl %r9d, %ecx
+ shrl %cl, %r8d
+ andl %r8d, %edx
+ bsrl %edx, %edx
+ jz 4f
+ leaq -16(%rdi,%rdx), %rax
+4: ret
+END (strrchr)
+
+weak_alias (strrchr, rindex)
+libc_hidden_builtin_def (strrchr)
diff --git a/libc/wcsmbs/wcsatcliff.c b/libc/wcsmbs/wcsatcliff.c
index 22db60763..b29571f29 100644
--- a/libc/wcsmbs/wcsatcliff.c
+++ b/libc/wcsmbs/wcsatcliff.c
@@ -15,6 +15,7 @@
#define STPNCPY wcpncpy
#define MEMCPY wmemcpy
#define MEMPCPY wmempcpy
+#define MEMCHR wmemchr
#include "../string/stratcliff.c"
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index db3131590..6f5e4f731 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,23 @@
+2009-04-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol
+ numbers.
+ * sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE):
+ Define.
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for
+ preadv and pwritev.
+
+2009-03-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags.
+
+2009-03-18 Zhang Le <r0bertz@gentoo.org>
+
+ [BZ #7074]
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Fix the condition used to annotate n32 objects.
+
2009-03-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h b/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
index dad2c2d09..60db51554 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -95,15 +95,20 @@ enum __socket_type
#define PF_ASH 18 /* Ash. */
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_MAX 35 /* For now.. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_MAX 36 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -130,14 +135,19 @@ enum __socket_type
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
index f479b6063..1cdf19e3f 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -31,4 +31,10 @@
# define __ASSUME_FCNTL64 1
#endif
+/* Support for preadv and pwritev was added in 2.6.30. */
+#if __LINUX_KERNEL_VERSION >= 0x02061e
+# define __ASSUME_PREADV 1
+# define __ASSUME_PWRITEV 1
+#endif
+
#include_next <kernel-features.h>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/readelflib.c b/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
index baa92fe57..547362f31 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002, 2003, 2005, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Alexandre Oliva <aoliva@redhat.com>
Based on work ../x86_64/readelflib.c,
@@ -39,11 +40,13 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
{
+ Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+
ret = process_elf32_file (file_name, lib, flag, osversion, soname,
file_contents, file_length);
/* n32 libraries are always libc.so.6+. */
- if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
+ if (!ret && (elf32_header->e_flags & EF_MIPS_ABI2) != 0)
*flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
}
else
diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
index 8b55ba631..b30d09a83 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
@@ -28,6 +28,8 @@ typedef uint64_t eventfd_t;
/* Flags for signalfd. */
enum
{
+ EFD_SEMAPHORE = 1,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
EFD_CLOEXEC = 02000000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 0200