Submitted By: Robert Connolly (ashes) Dan Nicholson Date: 2007-07-12 Initial Package Version: 2.5 Upstream Status: From Upstream Origin: cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \ co -r glibc-2_5-branch -d glibc-2.5-branch libc diff -pNur -x CVS -x libidn glibc-2.5 glibc-2.5-branch Description: This is a branch update for Glibc-2.5, and should be rechecked periodically. See the "Changelog" and "localedata/ChangeLog" files for specific details. diff -pNur -x CVS -x libidn glibc-2.5/argp/argp-help.c glibc-2.5-branch/argp/argp-help.c --- glibc-2.5/argp/argp-help.c 2006-05-09 23:28:06.000000000 -0700 +++ glibc-2.5-branch/argp/argp-help.c 2007-07-12 09:58:01.000000000 -0700 @@ -1,5 +1,6 @@ /* Hierarchial argument parsing help output - Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -672,9 +673,9 @@ hol_cluster_cmp (const struct hol_cluste { /* If one cluster is deeper than the other, use its ancestor at the same level, so that finding the common ancestor is straightforward. */ - while (cl1->depth < cl2->depth) + while (cl1->depth > cl2->depth) cl1 = cl1->parent; - while (cl2->depth < cl1->depth) + while (cl2->depth > cl1->depth) cl2 = cl2->parent; /* Now reduce both clusters to their ancestors at the point where both have @@ -987,7 +988,7 @@ static const char * filter_doc (const char *doc, int key, const struct argp *argp, const struct argp_state *state) { - if (argp->help_filter) + if (argp && argp->help_filter) /* We must apply a user filter to this output. */ { void *input = __argp_input (argp, state); diff -pNur -x CVS -x libidn glibc-2.5/argp/Makefile glibc-2.5-branch/argp/Makefile --- glibc-2.5/argp/Makefile 2006-05-09 15:42:24.000000000 -0700 +++ glibc-2.5-branch/argp/Makefile 2007-07-12 09:58:01.000000000 -0700 @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2002, 2003, 2006 Free Software Foundation, Inc. +# Copyright (C) 1997, 2002, 2003, 2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ distribute = argp-fmtstream.h argp-namef routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \ pvh xinl eexst) -tests = argp-test tst-argp1 bug-argp1 +tests = argp-test tst-argp1 bug-argp1 tst-argp2 CFLAGS-argp-help.c = $(uses-callbacks) -fexceptions CFLAGS-argp-parse.c = $(uses-callbacks) diff -pNur -x CVS -x libidn glibc-2.5/argp/tst-argp2.c glibc-2.5-branch/argp/tst-argp2.c --- glibc-2.5/argp/tst-argp2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/argp/tst-argp2.c 2007-07-12 07:58:56.000000000 -0700 @@ -0,0 +1,101 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2007. + + 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 + +static const struct argp_option opt1[] = + { + { "opt1", '1', "NUMBER", 0, "Option 1" }, + { NULL, 0, NULL, 0, NULL } + }; + +static const struct argp_option opt2[] = + { + { "opt2", '2', "NUMBER", 0, "Option 2" }, + { NULL, 0, NULL, 0, NULL } + }; + +static const struct argp_option opt3[] = + { + { "opt3", '3', "NUMBER", 0, "Option 3" }, + { NULL, 0, NULL, 0, NULL } + }; + +static const struct argp_option opt4[] = + { + { "opt4", '4', "NUMBER", 0, "Option 4" }, + { NULL, 0, NULL, 0, NULL } + }; + +static const struct argp_option opt5[] = + { + { "opt5", '5', "NUMBER", 0, "Option 5" }, + { NULL, 0, NULL, 0, NULL } + }; + +static struct argp argp5 = + { + opt5, NULL, "args doc5", "doc5", NULL, NULL, NULL + }; + +static struct argp argp4 = + { + opt4, NULL, "args doc4", "doc4", NULL, NULL, NULL + }; + +static struct argp argp3 = + { + opt3, NULL, "args doc3", "doc3", NULL, NULL, NULL + }; + +static struct argp_child children2[] = + { + { &argp4, 0, "child3", 3 }, + { &argp5, 0, "child4", 4 }, + { NULL, 0, NULL, 0 } + }; + +static struct argp argp2 = + { + opt2, NULL, "args doc2", "doc2", children2, NULL, NULL + }; + +static struct argp_child children1[] = + { + { &argp2, 0, "child1", 1 }, + { &argp3, 0, "child2", 2 }, + { NULL, 0, NULL, 0 } + }; + +static struct argp argp1 = + { + opt1, NULL, "args doc1", "doc1", children1, NULL, NULL + }; + + +static int +do_test (void) +{ + argp_help (&argp1, stdout, ARGP_HELP_LONG, (char *) "tst-argp2"); + return 0; +} + + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/ChangeLog glibc-2.5-branch/ChangeLog --- glibc-2.5/ChangeLog 2006-09-29 11:45:39.000000000 -0700 +++ glibc-2.5-branch/ChangeLog 2007-07-12 08:36:23.000000000 -0700 @@ -1,5 +1,1294 @@ +2007-07-03 Jakub Jelinek + + [BZ #4702] + * nis/nss-default.c: Include errno.h. + (init): Preserve errno. + +2007-07-01 Jakub Jelinek + + * elf/dl-sysdep.c (_dl_important_hwcaps): Add integer overflow check. + * elf/dl-minimal.c (__libc_memalign): Likewise. Handle malloc (0). + Return NULL if mmap failed instead of asserting it does not. + (calloc): Check for integer overflow. + + * elf/dl-minimal.c (__strtoul_internal): Fix parsing of numbers bigger + than LONG_MAX / 10. + +2007-06-19 Ulrich Drepper + + * sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements + to fill in holes + (rtld_global_ro): Likewise. + +2007-06-18 Jakub Jelinek + + * elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous. + Move PT_LOAD checking to... + (_dl_addr_inside_object): ... here, new function. + * elf/dl-sym.c (do_sym): If not l_contiguous, + call _dl_addr_inside_object. + * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise. + * dlfcn/dlinfo.c (dlinfo_doit): Likewise. + * elf/dl-open.c (dl_open_worker): Likewise. + (_dl_addr_inside_object): New function if IS_IN_rtld. + * elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no + holes are present or are PROT_NONE protected. + * include/link.h (struct link_map): Add l_contiguous field. + * sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype. + +2007-06-18 Jakub Jelinek + + * elf/rtld.c (dl_main): Don't call init_tls more than once. + +2007-06-19 Ulrich Drepper + + * elf/dl-close.c (free_mem): Free _dl_scope_free_list. + +2007-06-13 Jakub Jelinek + + * include/link.h: Don't include rtld-lowlevel.h. + (struct link_map): Remove l_scope_lock. + * sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h. + (_dl_scope_free_list): New field (variable) in _rtld_global. + (DL_LOOKUP_SCOPE_LOCK): Remove. + (_dl_scope_free): New prototype. + * elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock. + Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x. + (_dl_profile_fixup): Likewise. + * elf/dl-sym.c (do_sym): Likewise. Use wrapped _dl_lookup_symbol_x + whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and + THREAD_GSCOPE_RESET_FLAG around it. + * elf/dl-close.c (_dl_close_worker): Don't use + __rtld_mrlock_{change,done}. Call _dl_scope_free on the old + scope. Make sure THREAD_GSCOPE_WAIT () happens if any old + scopes were queued or if l_scope_mem has been abandoned. + * elf/dl-open.c (_dl_scope_free): New function. + (dl_open_worker): Use it. Don't use __rtld_mrlock_{change,done}. + * elf/dl-support.c (_dl_scope_free_list): New variable. + * elf/dl-lookup.c (add_dependency): Remove flags argument. + Remove DL_LOOKUP_SCOPE_LOCK handling. + (_dl_lookup_symbol_x): Adjust caller. Remove DL_LOOKUP_SCOPE_LOCK + handling. + * elf/dl-object.c (_dl_new_object): Don't use + __rtld_mrlock_initialize. + +2007-06-09 Ulrich Drepper + + * elf/do-lookup.h (do_lookup_x): Read r_nlist before r_list and + make sure gcc doesn't mess around with this. + +2007-06-08 Ulrich Drepper + + * elf/dl-lookup.c (_dl_lookup_symbol_x): Remove use of r_nlist. + +2007-06-08 Jakub Jelinek + + * elf/dl-close.c (_dl_close_worker): Remove all to be removed + libraries from the global scope at once and call THREAD_GSCOPE_WAIT + at most once per _dl_close_worker. + +2007-05-18 Ulrich Drepper + + * elf/dl-close.c (_dl_close_worker): When removing object from + global scope, wait for all lookups to finish afterwards. + * elf/dl-open.c (add_to_global): When global scope array must + grow, allocate a new one and free old array only after all + lookups finish. + * elf/dl-runtime.c (_dl_fixup): Protect using global scope. + (_dl_lookup_symbol_x): Likewise. + * elf/dl-support.c: Define _dl_wait_lookup_done. + * sysdeps/generic/ldsodefs.h (struct rtld_global): Add + _dl_wait_lookup_done. + +2007-05-11 Ulrich Drepper + + * elf/dl-close.c (_dl_close_worker): Help gcc to optimize by + adding new variables. + + * elf/dl-open.c (add_to_global): Introduce variable ns to help gcc + optimize. Completely extend global scope array before making the + new entries visible. + +2007-01-15 Ulrich Drepper + + * sysdeps/generic/ldsodefs.h: Define DL_LOOKUP_SCOPE_LOCK. + * elf/dl-lookup.c (add_dependency): If scope map is locked, unlock + it before getting dl_load_lock and then relock. + (_dl_lookup_symbol_x): Pass flags to add_dependency. + When rerunning _dl_lookup_symbol_x, compute symbol_scope again in + case we unlocked the scope. + * elf/dl-runtime.c (_dl_fixup): Pass DL_LOOKUP_SCOPE_LOCK to + _dl_lookup_symbol_x in case we locked the scope. + (_dl_profile_fixup): Likewise. + * elf/dl-sym.c (do_sym): In flags passed to call_dl_lookup, also + set DL_LOOKUP_SCOPE_LOCK. + +2006-10-29 Jakub Jelinek + + * elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P. + * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise. + * elf/dl-close.c (_dl_close_worker): Likewise. + * elf/dl-open.c (_dl_open_worker): Likewise. + * sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. + +2006-10-27 Jakub Jelinek + + * elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope + argument. + (_dl_lookup_symbol_x): Adjust caller. + + * sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove + _ns_global_scope. + * elf/rtld.c (dl_main): Don't initialize _ns_global_scope. + + * elf/dl-libc.c: Revert l_scope name changes. + * elf/dl-load.c: Likewise. + * elf/dl-object.c: Likewise. + * elf/rtld.c: Likewise. + * elf/dl-close.c (_dl_close): Likewise. + * elf/dl-open.c (dl_open_worker): Likewise. If not SINGLE_THREAD_P, + always use __rtld_mrlock_{change,done}. Always free old scope list + here if not l_scope_mem. + * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name + change. Never free scope list here. Just __rtld_mrlock_lock before + the lookup and __rtld_mrlock_unlock it after the lookup. + * elf/dl-sym.c: Likewise. + * include/link.h (struct r_scoperec): Remove. + (struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem + with l_scope_mem and l_scoperec_lock with l_scope_lock. + +2006-10-18 Ulrich Drepper + + * elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to + _dl_lookup_symbol_x code. + +2006-10-17 Jakub Jelinek + + * elf/dl-runtime.c: Include sysdep-cancel.h. + (_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and + scoperec->nusers only if !SINGLE_THREAD_P. + * elf/dl-sym.c: Include sysdep-cancel.h. + (do_sym): Use __rtld_mrlock_* and scoperec->nusers only + if !SINGLE_THREAD_P. + * elf/dl-close.c: Include sysdep-cancel.h. + (_dl_close): Use __rtld_mrlock_* and scoperec->nusers only + if !SINGLE_THREAD_P. + * elf/dl-open.c: Include sysdep-cancel.h. + (dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only + if !SINGLE_THREAD_P. + +2006-10-09 Ulrich Drepper + Jakub Jelinek + + Implement reference counting of scope records. + * elf/dl-close.c (_dl_close): Remove all scopes from removed objects + from the list in objects which remain. Always allocate new scope + record. + * elf/dl-open.c (dl_open_worker): When growing array for scopes, + don't resize, allocate a new one. + * elf/dl-runtime.c: Update reference counters before using a scope + array. + * elf/dl-sym.c: Likewise. + * elf/dl-libc.c: Adjust for l_scope name change. + * elf/dl-load.c: Likewise. + * elf/dl-object.c: Likewise. + * elf/rtld.c: Likewise. + * include/link.h: Include . Define struct + r_scoperec. Replace r_scope with pointer to r_scoperec structure. + Add l_scoperec_lock. + * sysdeps/generic/ldsodefs.h: Include . + * sysdeps/generic/rtld-lowlevel.h: New file. + +2007-06-06 Jakub Jelinek + + [BZ #4586] + * sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Treat + pseudo-zeros as zero. + * sysdeps/x86_64/ldbl2mpn.c: New file. + * sysdeps/ia64/ldbl2mpn.c: New file. + +2007-06-05 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c + (__mpn_construct_long_double): Fix conversion where result ought + to be smaller than __LDBL_MIN__, or the low double should be + denormal. Fix decision where to negate low double - honor round + to even rules. + * stdio-common/tst-sprintf2.c: Include string.h. + (COMPARE_LDBL): Define. + (TEST): Also test whether a string hexadecimal float representation + can be parsed back to the number. + (main): Add a couple of further tests. + +2007-06-04 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c + (PRINT_FPHEX_LONG_DOUBLE): Fix printing numbers where lower double + is non-zero, but smaller than 2 * __DBL_MIN__. + * stdio-common/tst-sprintf2.c: New test. + * stdio-common/Makefile (tests): Add tst-sprintf2. + +2007-06-04 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Remove + unused ily variable. Fix nextafterl on +-__LDBL_MAX__ and +-Inf. + Remove unreachable code at the end. + +2007-06-01 Steven Munroe + + * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: Correct description of + ldbl-128ibm in comment. + (fpclassifyl): Correct classification of denormals. + * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Correct + return value for MIN denormal. Rewrite using long double math too + correctly handle denormals and canonicalize the results. + +2007-05-29 Ulrich Drepper + + * nscd/nscd_helper.c (get_mapping): Handle short replies instead + of crashing. When this is the case or if the reply is malformed, + don't try to close the new file descriptor since it does not + exist. + Patch in part by Guillaume Chazarain . + +2007-05-21 Jakub Jelinek + + [BZ #4514] + * stdio-common/vfprintf.c (vfprintf): Don't shadow workstart variable, + reinitialize workend at the start of each do_positional format spec + loop, free workstart before do_positional loops. + (printf_unknown): Fix size of work_buffer. + * stdio-common/tst-sprintf.c (main): Add 3 new testcases. + +2007-05-10 Ulrich Drepper + + * include/sys/cdefs.h: Redefine __nonnull so that test for + incorrect parameters in the libc code itself are not omitted. + +2007-05-07 Ulrich Drepper + Jakub Jelinek + + * malloc/arena.c (heap_info): Add mprotect_size field, adjust pad. + (new_heap): Initialize mprotect_size. + (grow_heap): When growing, only mprotect from mprotect_size till + new_size if mprotect_size is smaller. When shrinking, use PROT_NONE + MMAP for __libc_enable_secure only, otherwise use MADV_DONTNEED. + +2007-05-06 Ulrich Drepper + + * stdio-common/vfprintf.c (process_string_arg): Optimize + ridiculous precision in wide char code printing multi-byte string. + Reported by Jim Meyering . + +2007-05-06 Ulrich Drepper + + [BZ #4465] + * posix/unistd.h: Remove __THROW from fdatasync. + +2007-05-06 Mike Frysinger + + [BZ #4465] + * sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Add "C" to args. + +2007-05-06 Ulrich Drepper + + [BZ #4131] + * elf/dl-addr.c (_dl_addr): Compare address with actual segment + boundaries to work around systems with overlapping binary loading. + Based on a patch by Suzuki . + +2007-05-04 Ulrich Drepper + + * stdio-common/vfprintf.c (process_string_arg): Adjust call to + __mbsnrtowcs after last change. + +2007-05-02 Jakub Jelinek + + * stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than + fixed length array for ignore. + +2007-04-30 Ulrich Drepper + + [BZ #4438] + * stdio-common/vfprintf.c (process_string_arg): Don't overflow the + stack for large precisions. + * stdio-common/test-vfprintf.c (main): Add test for large + precision. + +2007-04-30 Jakub Jelinek + + * stdio-common/printf_fp.c (___printf_fp): Don't print negative sign + for exponent 0. + * stdio-common/tfformat.c (sprint_doubles): Add a new test. + +2007-04-30 Jakub Jelinek + + [BZ #4439] + * resolv/inet_ntop.c (inet_ntop4): Take terminating '\0' into + account in the size check. + * resolv/tst-inet_ntop.c: New test. + * resolv/Makefile (tests): Add tst-inet_ntop. + +2007-04-28 Ulrich Drepper + + [BZ #4102] + * sysdeps/posix/getaddrinfo.c (default_labels): Assign separate + label to Teredo tunnel addresses 2001://32. + +2007-04-27 Ulrich Drepper + + [BZ #4342] + * stdio-common/vfscanf.c (_IO_vfscanf_internal): Allow + hexa-decimal floats without exponent. + * stdio-common/tstscanf.c (main): Adjust Test 8 test for success. + +2007-04-27 Ulrich Drepper + + [BZ #3213] + * locale/C-translit.h.in: Add entry for U2044. + +2007-04-25 Jakub Jelinek + + * sysdeps/unix/sysv/linux/check_pf.c (make_request): Return -1 instead + of 0 after the out_fail label. + +2007-03-18 Jakub Jelinek + + * nscd/gai.c: Include alloca.h. + (__libc_use_alloca): Define. + +2007-03-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Never + reallocate the buffer, instead fail for MSG_TRUNC or for EBUSY + NLMSG_ERR. Instead use a page sized buffer. + * sysdeps/unix/sysv/linux/check_pf.c (make_request): Use page sized + buffer. + +2007-03-02 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Retry with + a new netlink socket if NLMSG_ERR -EBUSY is seen after some MSG_TRUNC + message. + +2007-02-27 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Fix + memory reallocation. + +2007-04-25 Jakub Jelinek + + * libio/bits/stdio.h (fgetc_unlocked): Add extern inline optimized + version. + +2007-04-25 Ulrich Drepper + + [BZ #4406] + * iconv/gconv_charset.h (strip): Allow ':' + * iconv/iconv_open.c (iconv_open): Adjust comment. + +2007-04-23 Jakub Jelinek + + [BZ #4405] + * iconvdata/gconv-modules (E13B): Add a missing slash to the alias + name. Patch by Aurelien Jarno . + +2007-04-23 Jakub Jelinek + + [BZ #4381] + * nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Ensure sufficient + alignment of buffer and tmp_buffer. + * nis/nss_nis/nis-hosts.c (internal_nis_gethostent_r, + internal_gethostbyname2_r, _nss_nis_gethostbyaddr_r): Ensure sufficient + alignment of buffer. + * resolv/nss_dns/dns-hosts.c (getanswer_r): Likewise. Handle buflen + bigger than INT_MAX. + * resolv/nss_dns/dns-network.c (getanswer_r): Likewise. Add errnop and + h_errnop arguments. Fail if buflen is too small. + (_nss_dns_getnetbyname_r, _nss_dns_getnetbyaddr_r): Adjust callers. + +2007-04-19 Ulrich Drepper + + * include/sys/mman.h: Mark madvise hidden. + * misc/madvise.c: Add libc_hidden_def. + +2007-04-17 Ulrich Drepper + + [BZ #4368] + * stdlib/stdlib.h: Remove obsolete part of comment for realpath. + +2007-04-16 Ulrich Drepper + + [BZ #4364] + * posix/unistd.h (_XOPEN_VERSION): Define appropriately for SUSv3. + +2007-04-13 Jakub Jelinek + + [BZ #4344] + * elf/ldconfig.c (search_dir): Fix 2 off-by-2 errors. + Reported by David Anderson . + +2007-04-13 Jakub Jelinek + + * stdio-common/printf_fp.c (___printf_fp): Fix exponent -4 + special case handling when wcp == wstartp + 1. Fix a comment typo. + * stdio-common/tfformat.c (sprint_doubles): Add a new testcase. + +2007-02-21 Ulrich Drepper + + [BZ #4070] + * stdio-common/printf_fp.c (___printf_fp): Handle a few more + special cases. + * stdio-common/tfformat.c (sprint_doubles): Some more tests. + +2007-02-19 Ulrich Drepper + + * stdio-common/printf_fp.c (___printf_fp): Cleanups and minor + optimization. + +2007-04-06 Jakub Jelinek + + * nis/nis_domain_of.c (__nis_domain_of): New function. + * include/rpcsvc/nislib.h (__nis_domain_of): New prototype. + * nis/nis_lookup.c (nis_lookup): Use __nis_domain_of. + * nis/nis_call.c (rec_dirsearch): Likewise. + (first_shoot): Likewise. Remove search_parent_first argument. + (struct nis_server_cache): Rename search_parent_first field + to search_parent. + (nis_server_cache_search, nis_server_cache_add): Rename + search_parent_first argument to search_parent. + (__nisfind_server): Likewise. If search_parent, call + __nis_domain_of. + +2007-04-05 Jakub Jelinek + + * nis/nis_call.c (__nisfind_server): Replace (*dir)->do_servers + with obj->do_servers after first_shoot. + +2007-03-21 Jakub Jelinek + + * nis/nis_call.c: Include bits/libc-lock.h, sys/stat.h, unistd.h. + (nis_server_cache, nis_server_cache_lock, nis_cold_start_mtime): New + variables. + (nis_server_cache_search, nis_server_cache_add): New functions. + (__nisfind_server): Use them. Add dbp and flags argument, if + call __nisbind_create. + (__nisbind_create): Add server_used and current_ep arguments, + only call __nis_findfastest if server_used is ~0. + (__do_niscall2, __prepare_niscall): Adjust callers. + (ckey_cache, ckey_cache_size, ckey_cache_allocated, ckey_cache_pid, + ckey_cache_euid, ckey_cache_lock): New variables. + (get_ckey): New function. + (__nisbind_connect): If not dbp->use_udp, pass IPPROTO_TCP to + __pmap_getnisport. Save __pmap_getnisport result in + dbp->addr.sin_port if non-zero. Use get_ckey to create conversation + key. + * nis/nis_lookup.c (nis_lookup): Likewise. + * nis/nis_table.c (nis_list): Likewise. + * nis/rpcsvc/nislib.h (__nisbind_create, __nisfind_server): Adjust + prototypes. + + * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_getpwnam_r, + _nss_nisplus_getpwuid_r): Pass USE_DGRAM flag to nis_list. + * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_getservbyname_r, + _nss_nisplus_getservbyport_r): Likewise. + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyname_r, + _nss_nisplus_getnetbyaddr_r): Likewise. + * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_getspnam_r): Likewise. + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r, + _nss_nisplus_getntohost_r): Likewise. + * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_getrpcbyname_r, + _nss_nisplus_getrpcbynumber_r): Likewise. + +2007-04-01 Jakub Jelinek + + * sysdeps/ia64/fpu/fesetround.c (fesetround): Return 0 on success + and 1 on failure. + +2007-04-01 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Use + math_opt_barrier and math_force_eval macros. + +2007-03-27 Jakub Jelinek + + [BZ #3306] + * math/math_private.h (math_opt_barrier, math_force_eval): Define. + * sysdeps/i386/fpu/math_private.h: New file. + * sysdeps/x86_64/fpu/math_private.h: New file. + * math/s_nexttowardf.c (__nexttowardf): Use math_opt_barrier and + math_force_eval macros. Use "+m" constraint on asm rather than + "=m" and "m". + * math/s_nextafter.c (__nextafter): Likewise. + * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward): + Likewise. + * sysdeps/ieee754/flt-32/s_nextafterf.c (__nextafterf): Likewise. + * sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward): Likewise. + * sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise. + * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Use + math_opt_barrier and math_force_eval macros. + * sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl): Likewise. + * sysdeps/ieee754/ldbl-96/s_nextafterl.c (__nextafterl): Likewise. + * sysdeps/i386/fpu/s_nexttoward.c: Include float.h. + (__nexttoward): Use math_opt_barrier and + math_force_eval macros. Use "+m" constraint on asm rather than + "=m" and "m". Only use asm to force double result if + FLT_EVAL_METHOD is 2. + * sysdeps/i386/fpu/s_nexttowardf.c: Include float.h. + (__nexttowardf): Use math_opt_barrier and + math_force_eval macros. Use "+m" constraint on asm rather than + "=m" and "m". Only use asm to force double result if + FLT_EVAL_METHOD is not 0. + * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: Include float.h. + (__nexttowardf): Use math_opt_barrier and + math_force_eval macros. If FLT_EVAL_METHOD is not 0, force + x to float using asm. + * sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: Include float.h. + (__nldbl_nexttowardf): Use math_opt_barrier and + math_force_eval macros. If FLT_EVAL_METHOD is not 0, force + x to float using asm. + * sysdeps/ieee754/ldbl-96/s_nexttowardf.c: Include float.h. + (__nexttowardf): Use math_opt_barrier and math_force_eval + macros. If FLT_EVAL_METHOD is not 0, force x to float using asm. + * math/bug-nextafter.c (zero, inf): New variables. + (main): Add new tests. + * math/bug-nexttoward.c (zero, inf): New variables. + (main): Add new tests. + +2007-03-30 Jakub Jelinek + + * libio/libio.h (__underflow, __uflow, __overflow, __wunderflow, + __wuflow, __woverflow, _IO_getc, _IO_putc, _IO_peekc_locked, _IO_padn, + _IO_sgetn, _IO_seekoff, _IO_seekpos, _IO_getwc, _IO_putwc, _IO_wpadn): + Remove __THROW. + * libio/fileops.c (new_do_write, _IO_file_xsgetn_mmap, + _IO_file_xsgetn_maybe_mmap): Likewise. + * libio/oldfileops.c (old_do_write): Likewise. + * libio/libioP.h (_IO_switch_to_get_mode, _IO_switch_to_wget_mode, + _IO_init_marker, _IO_init_wmarker, _IO_default_uflow, + _IO_wdefault_uflow, _IO_default_setbuf, _IO_default_seekpos, + _IO_do_write, _IO_new_do_write, _IO_old_do_write, _IO_wdo_write, + _IO_flush_all_lockp, _IO_flush_all, _IO_cleanup, + _IO_flush_all_linebuffered, _IO_new_fgetpos, _IO_old_fgetpos, + _IO_new_fsetpos, _IO_old_fsetpos, _IO_new_fgetpos64, + _IO_old_fgetpos64, _IO_new_fsetpos64, _IO_old_fsetpos64, + _IO_file_setbuf, _IO_file_seekoff, _IO_file_xsputn, _IO_file_xsgetn, + _IO_file_underflow, _IO_file_underflow_mmap, + _IO_file_underflow_maybe_mmap, _IO_file_overflow, _IO_file_attach, + _IO_file_open, _IO_file_fopen, _IO_file_write, _IO_file_read, + _IO_file_sync, _IO_file_close_it, _IO_file_finish, + _IO_new_file_attach, _IO_new_file_close_it, _IO_new_file_finish, + _IO_new_file_fopen, _IO_new_file_setbuf, _IO_file_setbuf_mmap, + _IO_new_file_sync, _IO_new_file_underflow, _IO_new_file_overflow, + _IO_new_file_seekoff, _IO_new_file_write, _IO_new_file_xsputn, + _IO_old_file_setbuf, _IO_old_file_seekoff, _IO_old_file_xsputn, + _IO_old_file_underflow, _IO_old_file_overflow, _IO_old_file_attach, + _IO_old_file_fopen, _IO_old_file_write, _IO_old_file_sync, + _IO_old_file_close_it, _IO_old_file_finish, _IO_wfile_xsputn, + _IO_wfile_setbuf, _IO_wfile_sync, _IO_wfile_underflow, + _IO_wfile_overflow, _IO_wfile_seekoff, _IO_old_proc_open, + _IO_old_proc_close, _IO_getdelim, _IO_flush_all_internal, + _IO_adjust_column_internal, _IO_default_uflow_internal, + _IO_default_xsgetn_internal, _IO_wdefault_xsputn_internal, + _IO_wdefault_xsgetn_internal, _IO_wdefault_uflow_internal, + _IO_file_setbuf_internal, _IO_file_seekoff_internal, + _IO_file_xsputn_internal, _IO_file_xsgetn_internal, + _IO_file_close_it_internal, _IO_file_underflow_internal, + _IO_file_overflow_internal, _IO_file_attach_internal, + _IO_file_fopen_internal, _IO_file_sync_internal, + _IO_file_finish_internal, _IO_wfile_xsputn_internal, + _IO_wfile_seekoff_internal, _IO_wfile_sync_internal, + _IO_switch_to_wget_mode_internal, _IO_padn_internal, + _IO_switch_to_get_mode_internal, _IO_seekoff_unlocked, + _IO_seekpos_unlocked): Likewise. + (_IO_strtod, _IO_dtoa, _IO_outfloat, _IO_read, _IO_write, + _IO_lseek, _IO_close, _IO_fstat): Remove unused prototypes. + +2007-03-23 Jakub Jelinek + + * scripts/check-local-headers.sh: Filter out sys/capability.h. + +2007-03-22 Jakub Jelinek + + * config.h.in (HAVE_LIBCAP): Add. + * nscd/selinux.h: Include sys/capability.h rather than non-existent + sys/capabilities.h. + * nscd/selinux.c (preserve_capabilities): Use cap_free instead of + free_caps. Cast away const from 4th cap_set_flag argument. + +2007-03-16 Jakub Jelinek + + * elf/dl-open.c (dl_open_worker): Declare l in 2 different + smaller scopes. + * elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument. + (DL_DST_REQUIRED): Adjust user. + +2007-03-15 Jakub Jelinek + + * locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is + NULL. + +2007-03-15 Jakub Jelinek + + [BZ #4181] + * inet/inet6_opt.c (add_padding): Only insert padding if npad > 0. + (inet6_opt_append): Don't check extlen is big enough if extbuf + is NULL. + (inet6_opt_finish): Likewise. + * inet/Makefile (tests): Add test-inet6_opt. + * inet/test-inet6_opt.c: New test. + +2007-03-15 Jakub Jelinek + + [BZ #4130] + * login/utmp_file.c (setutent_file): Use O_LARGEFILE for + open_not_cancel_2. + (updwtmp_file): Likewise. + +2007-03-15 Jakub Jelinek + + [BZ #4101] + * argp/argp-help.c (hol_cluster_cmp): Fix comparisons used to find + ancestors with the same depths. + Patch by Niels Moeller . + (filter_doc): Don't crash if argp is NULL. + * argp/Makefile (tests): Add tst-argp2. + * argp/tst-argp2.c: New test. + +2007-03-15 Jakub Jelinek + + [BZ #3919] + * math/libm-test.inc (log_test): Test -Inf and NaN. + (log10_test, log1p_test, log2_test): Test -Inf. + * sysdeps/i386/fpu/e_log.S (__ieee754_log): Don't raise + FE_INVALID when argument is qNaN. + * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise. + * sysdeps/i386/fpu/e_logf.S (__ieee754_logf): Likewise. + * sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise. + * sysdeps/x86_64/fpu/e_log10l.S (__ieee754_log10l): Replace + andb $1, %ah with testb $1, %ah, don't test for parity, instead + testb $4, %ah and jump if non-zero. + * sysdeps/x86_64/fpu/e_log2l.S (__ieee754_log2l): Likewise. + * sysdeps/x86_64/fpu/s_log1pl.S (__log1pl): Likewise. + +2007-03-06 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (get_scope): Correct test for + 172.16/12 address range. + +2007-03-01 Jakub Jelinek + + [BZ #4069] + * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Check for NaN + earlier. + * math/libm-test.inc (pow_test): Add more tests involving NaNs. + + * sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Avoid invalid exception + for x qNaN and y either +-inf or non-integer value. + * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Likewise. + * sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise. + * sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise. + +2007-02-21 Ulrich Drepper + + [BZ #4076] + * io/ftw.c (ftw_startup): Handle special case of FTW_CHDIR in /. + (open_dir_stream): Likewise. + * io/Makefile (tests): Add bug-ftw5. + * io/bug-ftw5.c: New file. + +2007-02-21 Ulrich Drepper + + * nscd/grpcache.c (cache_addgr): In case a record changed on + refresh, adjust key_copy. + + [BZ #4074] + * nscd/pwdcache.c (cache_addpw): In case a record changed on + refresh, adjust key_copy. + +2007-02-21 Ulrich Drepper + + [BZ #3458] + * sysdeps/unix/sysv/linux/posix_madvise.c: New file. + * sysdeps/unix/sysv/linux/syscalls.list: Remove posix_madvise entry. + +2007-02-17 Ulrich Drepper + + [BZ #3842] + * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Remove shortcut + using __libc_enable_secure. + +2007-02-17 Ulrich Drepper + + [BZ #3348] + * malloc/memusage.sh: Cleanups. + * debug/xtrace.sh: Quoting and trap changes. + +2007-02-16 Ulrich Drepper + + * locale/iso-3166.def: Add entry for Serbia. + * locale/iso-4217.def: Define RSD. + +2007-02-15 Ulrich Drepper + + * nscd/nscd_helper.c (open_socket): Don't send padding bytes from + reqdata. + +2007-02-13 Ulrich Drepper + + * po/ru.po: Update from translation team. + +2007-02-03 Ulrich Drepper + + * po/sv.po: Update from translation team. + +2007-02-12 Jakub Jelinek + + * sysdeps/i386/bits/byteswap.h (__bswap_32): Add __amdfam10__ + to the list of i486+ CPUs. + * sysdeps/x86_64/bits/byteswap.h (__bswap_32): Likewise. + +2007-01-24 Jakub Jelinek + + * sysdeps/i386/bits/byteswap.h (__bswap_32): Add __nocona__, __core2__ + and __geode__ to the list of i486+ CPUs. + * sysdeps/x86_64/bits/byteswap.h (__bswap_32): Likewise. + +2007-02-08 Jakub Jelinek + + [BZ #3944] + * time/strptime_l.c (__strptime_internal): Set have_mon for + %b/%B/%h. Set have_mon and have_mday if tm_mon and tm_mday + have been computed from tm_yday and tm_year. Don't crash + in day_of_the_week or day_of_the_year if not have_mon + and tm_mon contains bogus value. + * time/Makefile (tests): Add tst-strptime3. + * time/tst-strptime3.c: New test. + +2007-02-05 Jakub Jelinek + + [BZ #3957] + * posix/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0' + bit for RE_HAT_LISTS_NOT_NEWLINE. + (build_charclass_op): Remove bogus comment. + * posix/Makefile (tests): Add bug-regex27 and bug-regex28. + * posix/bug-regex27.c: New test. + * posix/bug-regex28.c: New test. + +2007-02-02 Bruno Haible + + [BZ #3954] + * iconvdata/ksc5601.c (__ksc5601_sym_to_ucs, __ksc5601_sym_from_ucs): + Add mapping for U+327E. + * iconvdata/ksc5601.h (KSC5601_SYMBOL): Increment. + * iconvdata/johab.c (BODY for FROM_LOOP, BODY for TO_LOOP): Enable + mapping of 0xD9 0xE8. + * iconvdata/uhc.c (BODY for FROM_LOOP, BODY for TO_LOOP): Disable + mapping of U+327E. + Reported by Jungshik Shin . + + [BZ #3955] + * iconvdata/johab.c (BODY for FROM_LOOP, BODY for TO_LOOP): Enable + mapping of 0xD9 0xE6 and of 0xD9 0xE7. + Reported by Jungshik Shin . + +2007-01-31 Jakub Jelinek + + * nscd/nscd-client.h (__nscd_cache_search): Remove const qualifier + from return value. + * nscd/nscd_helper.c: Include string.h. + (__nscd_cache_search): Remove const qualifier from return value. + On strict alignment architectures check hash entry and data head + alignment. + * nscd/nscd_getpw_r.c (nscd_getpw_r): Don't crash or fail because + mmapped data during GC cycle contains garbage. If + __nscd_drop_map_ref fails, decrement mapped->counter when returning + error or if retrying with NO_MAPPING, only __nscd_unmap if counter + dropped to 0. + * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. + * nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise. + * nscd/nscd_getai.c (__nscd_getai): Likewise. + +2007-01-22 Ulrich Drepper + + [BZ #3902] + * stdio-common/_itoa.c (_itoa): Make sure at least a zero is emitted. + * stdio-common/Makefile (tests): Add bug17. + * stdio-common/bug17.c: New file. + +2007-01-15 Jakub Jelinek + + * soft-fp/op-common.h (FP_TRUNC): When truncating a NaN, clear + workbits in semi-raw fraction. + + * math/test-misc.c: Add new tests. + +2007-01-14 Steven Munroe + + * math/basic-test.c: Include test-skeleton.c. + (TEST_TRUNC): Define. + (truncdfsf_test, trunctfsf_test, trunctfdf_test): New. + (main): Rename to ... + (do_test): ...this. Run new tests. + (TEST_FUNCTION): Define. + +2006-10-05 Steven Munroe + Joe Kerian + + [BZ #2749] + * soft-fp/op-4.h (__FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Correct borrow + handling for high words. + * soft-fp/op-common.h (_FP_OVERFLOW_SEMIRAW): Always set inexact + and overflow for infinity. + +2007-01-13 Ulrich Drepper + + * nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Correct + computation of keylen. + +2007-01-10 Ulrich Drepper + + * io/fts.c: Make sure fts_cur is always valid after return from + fts_read. + Patch by Miloslav Trmac . + +2007-01-03 Jakub Jelinek + + * posix/execvp.c: Include alloca.h. + (allocate_scripts_argv): Renamed to... + (scripts_argv): ... this. Don't allocate buffer here nor count + arguments. + (execvp): Use alloca if possible. + * posix/Makefile: Add rules to build and run tst-vfork3 test. + * posix/tst-vfork3.c: New test. + +2007-01-05 Steven Munroe + + * stdlib/tst-makecontext.c: Include errno.h. Change main() + to do_test(). Define TEST_FUNCTION. Include test-skeleton.c. + (do_test): Check errno and exit(0) if ENOSYS. + +2007-01-11 Jakub Jelinek + + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix handling of multi-byte + thousands separators. + * stdlib/Makefile: Add rules to build and run tst-strtod4. + * stdlib/tst-strtod4.c: New test. + + [BZ #3855] + * stdlib/strtod_l.c (____STRTOF_INTERNAL): 0x. not followed by + hexadecimal digit should accept just the initial 0. + * stdlib/tst-strtod2.c (tests): New variable. + (do_test): Run several tests rather than just one. + +2007-01-03 Ulrich Drepper + + * stdlib/Makefile (tst-strtod3-ENV): Define. + +2006-12-11 Ulrich Drepper + + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand + separators also if no non-zero digits found. + * stdlib/Makefile (tests): Add tst-strtod3. + +2006-12-09 Ulrich Drepper + + [BZ #3664] + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize + empty parsed strings. + * stdlib/Makefile (tests): Add tst-strtod2. + * stdlib/tst-strtod2.c: New file. + + [BZ #3673] + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit + computation. + * stdlib/Makefile (tests): Add tst-atof2. + * stdlib/tst-atof2.c: New file. + + [BZ #3674] + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value + correctly if removing trailing zero of hex-float. + * stdlib/Makefile (tests): Add tst-atof1. + * stdlib/tst-atof1.c: New file. + +2007-01-03 Ulrich Drepper + + * string/Makefile (tst-strxfrm2-ENV): Define. + +2006-11-10 Jakub Jelinek + + * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization + if N is one bigger than return value. + * string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1 + and l1 last arguments, if buf is defined, verify the return value + equals to strlen (buf) and verify no byte beyond passed length + is modified. + +2006-11-09 Ulrich Drepper + + * string/Makefile (tests): Add tst-strxfrm2. + * string/tst-strxfrm2.c: New file. + +2006-11-08 Jakub Jelinek + + * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal + optimization even if needed > n. + +2006-12-22 Gavin Romig-Koch + + * nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't + blacklist the group till after we look it up. + +2006-12-21 Ulrich Drepper + + * include/atomic.h (atomic_forced_read): New macro. + +2006-12-19 Jakub Jelinek + + * stdlib/Makefile (tests): Add tst-makecontext. + * stdlib/tst-makecontext.c: New test. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S + (__makecontext): Don't realign uc_mcontext.uc_regs. + +2006-12-13 Jakub Jelinek + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include + kernel-features.h. + +2006-12-19 Jakub Jelinek + + * nss/getXXbyYY_r.c: Include atomic.h. + (INTERNAL (REENTRANT_NAME)): Write startp after start_fct, + add atomic_write_barrier () in between. + +2006-12-18 Jakub Jelinek + + [BZ #3747] + * stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the + [-231 .. 231) range. + * stdlib/tst-rand48.c (main): Fix expected values for 64-bit + targets. + * stdlib/tst-rand48-2.c: New test. + * stdlib/Makefile (tests): Add tst-rand48-2. + +2006-12-14 Jakub Jelinek + + * misc/tst-pselect.c (do_test): Fix sigblock argument. + +2006-12-14 Ulrich Drepper + + * misc/tst-pselect.c (do_test): Make sure the helper process is + terminating when the test is aborted. + +2006-12-13 Ulrich Drepper + + [BZ #2337] + * libio/Makefile (tests): Add tst-setvbuf1. + * libio/tst-setvbuf1.c: New file. + +2006-12-08 Jakub Jelinek + + [BZ #2337] + * libio/genops.c (__uflow): Fix a typo. + * libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat + nor set _IO_LINE_BUF bit here. Size the wide buffer based on + the narrow buffer size. + +2006-11-24 Jakub Jelinek + + [BZ #2337] + * libio/libio.h (_IO_FLAGS2_USER_WBUF): Define. + * libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set + _IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit + in _flags. + * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf, + _IO_wstr_finish): Likewise. + * libio/wmemstream.c (open_wmemstream): Likewise. + * libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp] + even for wide streams. + +2006-12-09 Jakub Jelinek + + * misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest. + Start searching for next comma at p rather than rest. + * misc/Makefile (tests): Add tst-mntent2. + * misc/tst-mntent2.c: New test. + +2006-12-09 Ulrich Drepper + + [BZ #3632] + * include/features.h: Fix comment about default value for + _POSIX_C_SOURCE. + +2006-12-09 Jakub Jelinek + + * misc/getusershell.c (initshells): Check for integer overflows. + Make strings buffer one bigger as fgets always succeeds when second + argument is 1. Don't use calloc for shells array. Disallow + / as shell. + +2006-12-05 Jakub Jelinek + + * nis/nis_subr.c (nis_getnames): Revert last change. + +2006-10-11 Jakub Jelinek + + * nis/nis_defaults.c (__nis_default_access): Don't call getenv twice. + + * nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv. + * sysdeps/generic/unsecvars.h: Add NIS_PATH. + +2006-12-04 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ttyname.c: Include termios.h. + (ttyname): Use tcgetattr instead of isatty, don't set errno to ENOTTY. + * sysdeps/unix/sysv/linux/ttyname_r.c: Include termios.h. + (__ttyname_r): Use tcgetattr instead of isatty, don't set errno to + ENOTTY. + * io/Makefile: Add rules to build and run tst-ttyname_r test. + * io/tst-ttyname_r.c: New test. + +2006-11-28 Jakub Jelinek + + * elf/dl-support.c: Include dl-procinfo.h. + * sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4, + PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS, + PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X): + Define. + (_dl_string_platform): Use PPC_PLATFORM_* macros instead of + hardcoded constants. + * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use + PPC_PLATFORM_* macros for array designators. + +2006-11-11 Steven Munroe + + * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap + names to the beginning. + (_dl_powerpc_platforms): Add "power6x". + * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. + (HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP. + (_DL_PLATFORMS_COUNT): Increase. + (_dl_string_platform): Handle power6x case. + * sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP, + PPC_FEATURE_POWER6_EXT): Define. + (PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment. + +2006-11-27 Jakub Jelinek + + [BZ #3559] + * sunrpc/svc_run.c (svc_run): Fail instead of segfaulting if + malloc crashed. + +2006-11-14 Jakub Jelinek + + * nss/nss_files/files-alias.c (get_next_alias): Set line back + to first_unused after parsing :include: file. + +2006-11-14 Ulrich Drepper + + * po/nl.po: Update from translation team. + +2006-11-10 Ulrich Drepper + + * po/sv.po: Update from translation team. + +2006-11-01 Ulrich Drepper + + * po/sv.po: Update from translation team. + +2006-10-29 Ulrich Drepper + + * po/sv.po: Update from translation team. + +2006-10-09 Ulrich Drepper + + * po/sv.po: Update from translation team. + +2006-10-07 Ulrich Drepper + + * po/tr.po: Update from translation team. + +2006-10-06 Ulrich Drepper + + * po/pl.po: Update from translation team. + +2006-11-10 Ulrich Drepper + + [BZ #3451] + * sysdeps/i386/fpu/bits/mathinline.h (floor): Make rounding mode + change atomic. + (ceil): Likewise. + +2006-11-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word): Add + noinline attribute. + +2006-11-10 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Add + noinline attribute. + +2006-11-05 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): + Update handling of cache descriptor 0x49 for new models. + * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word): + Likewise. + +2006-11-08 Jakub Jelinek + + * elf/dl-load.c (decompose_rpath): Return bool rather than void. + If l->l_name is on inhibit_rpath list, set sps->dirs to -1 and + return false, otherwise return true. + (cache_rpath): Return decompose_rpath return value. + +2006-11-02 Jakub Jelinek + + * malloc/memusage.c (dest): Reset not_me back to false after + printing statistics. + +2006-10-27 Ulrich Drepper + + * elf/dl-close.c (_dl_close_worker): Renamed from _dl_close and + split out locking and parameter checking. + (_dl_close): Call _dl_close_worker after locking and checking. + * elf/dl-open.c (_dl_open): Call _dl_close_worker instead of + _dl_close. + * elf/Makefile: Add rules to build and run tst-thrlock. + * elf/tst-thrlock.c: New file. + + [BZ #3429] + * elf/dl-open.c (dl_open_worker): Keep holding dl_load_lock until + we are sure we do not need it anymore for _dl_close. Also move + the asserts inside the lock region. + Patch mostly by Suzuki . + +2006-10-17 Jakub Jelinek + + * sunrpc/xdr_mem.c (xdrmem_setpos): Don't compare addresses + as signed longs, check for x_base + pos overflow. + * sunrpc/Makefile (tests): Add tst-xdrmem2. + * sunrpc/tst-xdrmem2.c: New test. + +2006-10-16 Ulrich Drepper + + [BZ #3369] + * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Fix typos in rules 4 + and 7. + +2006-10-13 Ulrich Drepper + + * elf/dl-minimal.c (realloc): Optimize last patch. + +2006-10-12 Richard Sandiford + + [BZ #3352] + * elf/dl-minimal.c (realloc): Let malloc() return a new pointer, + and use memcpy() if it does. + +2006-10-11 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/sysdep.h (DOARGS_6): Fix offset. + +2006-10-10 Ulrich Drepper + + * nis/nis_subr.c (nis_getnames): Add trailing dot to NIS_PATH + components which lack them. + + * nis/nis_subr.c (nis_getnames): Make sure that we always return + at least one entry consisting of the parameter concatenated with + the domain. + +2006-10-09 Jakub Jelinek + + * elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0 + rather than r->r_brk. + +2006-10-06 Ulrich Drepper + + * nis/nis_table.c (nis_list): If __follow_path fails in the new + code, make sure the nis_freeresult call doesn't crash and that the + result is reported correctly. + +2006-09-27 Jakub Jelinek + + * nis/nis_table.c (nis_list): Handle FOLLOW_PATH | ALL_RESULTS + when callback is NULL. + + * nis/Versions (libnss_nisplus): Add + _nss_nisplus_initgroups_dyn@@GLIBC_PRIVATE. + * nis/Makefile (libnss_nisplus-routines): Add nisplus-initgroups. + * nis/nss_nisplus/nisplus-grp.c (tablename_val, tablename_len, + _nss_create_tablename): Rename to... + (grp_tablename_val, grp_tablename_len, _nss_grp_create_tablename): + ... these. No longer static. + (internal_setgrent): Adjust users. + (_nss_nisplus_getgrnam_r, _nss_nisplus_getgrgid_r): Likewise. + Don't use locking around _nss_grp_create_tablename call. + * nis/nss_nisplus/nisplus-initgroups.c: New file. + +2006-10-06 Andreas Jaeger + + * include/features.h (__GLIBC_MINOR__): It's glibc 2.5 now. + +2006-10-06 Ulrich Drepper + + * po/pl.po: Update from translation team. + + * nscd/nscd.c (main): Fix typo in message. + Patch by Jakub Bogsz . + +2006-10-02 Jakub Jelinek + + [BZ #3291] + * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Include + errno.h, signal.h, unistd.h and sysdep-cancel.h. + (__sigprocmask): Define. + +2006-10-02 Ulrich Drepper + + * elf/rtld.c (dl_main): Don't use prelinking if LD_DYNAMIC_WEAK is + used. + +2006-10-02 Jakub Jelinek + + * nscd/mem.c (mempool_alloc): Round array size to 16 bytes + in oldtotal and newtotal calculation. + * nscd/nscd-client.h (struct mapped_database): Add datasize + field. + * nscd/nscd_helper.c (get_mapping): Initialize datasize field. + (__nscd_get_map_ref): Get a new mapping even if mapping's data_size + increased. + (__nscd_cache_search): Add checks to make sure we never reference + data beyond the current mapping. + +2006-10-02 Dmitry V. Levin + + * sysdeps/posix/getaddrinfo.c (match_prefix): Make mask and val + variables const to avoid compiler warnings. + + * io/fts.c (fts_close): Remove redundant checks. + (fts_build): Likewise. + (fts_palloc): Likewise. + + * manual/message.texi (Advanced gettext functions, + Using gettextized software): Fix typos. + +2006-09-30 Ulrich Drepper + + * posix/glob.c (glob_in_dir): Add some comments and asserts to + explain why there are no leaks. + 2006-09-29 Ulrich Drepper + * libio/wmemstream.c: Include . + * libio/bug-wmemstream1.c: Likewise. + * libio/tst-wmemstream1.c: Likewise. + * libio/tst-wmemstream2.c: Likewise. + * version.h (RELEASE): Bump to 2.5. * README: Regenerated. @@ -575,7 +1864,7 @@ * nis/nis_xdr.c: Avoid some function calls. 2006-08-07 Jakub Jelinek - Ulrich Drepper + Ulrich Drepper * nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take short cut if only one name component is stripped away. diff -pNur -x CVS -x libidn glibc-2.5/config.h.in glibc-2.5-branch/config.h.in --- glibc-2.5/config.h.in 2006-03-02 07:54:43.000000000 -0800 +++ glibc-2.5-branch/config.h.in 2007-07-12 08:07:13.000000000 -0700 @@ -19,6 +19,9 @@ /* Defined if building with SELinux support & audit libs are detected. */ #undef HAVE_LIBAUDIT +/* Defined if building with SELinux support & libcap libs are detected. */ +#undef HAVE_LIBCAP + /* Define if using XCOFF. Set by --with-xcoff. */ #undef HAVE_XCOFF diff -pNur -x CVS -x libidn glibc-2.5/debug/xtrace.sh glibc-2.5-branch/debug/xtrace.sh --- glibc-2.5/debug/xtrace.sh 2006-05-19 09:43:31.000000000 -0700 +++ glibc-2.5-branch/debug/xtrace.sh 2007-07-12 09:58:01.000000000 -0700 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999, 2001-2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001-2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -161,32 +161,32 @@ if test -n "$data"; then while read fct; do read file if test "$fct" != '??' -a "$file" != '??:0'; then - format_line $fct $file + format_line "$fct" "$file" fi done else - fifo=$(mktemp -u ${TMPDIR:-/tmp}/xtrace.XXXXXX) + fifo=$(mktemp -ut xtrace.XXXXXX) || exit + trap 'rm -f "$fifo"; exit 1' HUP INT QUIT TERM PIPE mkfifo -m 0600 $fifo || exit 1 - trap 'rm $fifo; exit 1' SIGINT SIGTERM SIGPIPE # Now start the program and let it write to the FIFO. $TERMINAL_PROG -T "xtrace - $program $*" -e /bin/sh -c "LD_PRELOAD=$pcprofileso PCPROFILE_OUTPUT=$fifo $program $*; read < $fifo" & termpid=$! - $pcprofiledump -u $fifo | + $pcprofiledump -u "$fifo" | while read line; do - echo $line | + echo "$line" | sed 's/this = \([^,]*\).*/\1/' | - addr2line -fC -e $program + addr2line -fC -e "$program" done | while read fct; do read file if test "$fct" != '??' -a "$file" != '??:0'; then - format_line $fct $file + format_line "$fct" "$file" fi done read -p "Press return here to close $TERMINAL_PROG($program)." - echo > $fifo - rm $fifo + echo > "$fifo" + rm "$fifo" fi exit 0 diff -pNur -x CVS -x libidn glibc-2.5/dlfcn/dlinfo.c glibc-2.5-branch/dlfcn/dlinfo.c --- glibc-2.5/dlfcn/dlinfo.c 2006-02-28 22:18:28.000000000 -0800 +++ glibc-2.5-branch/dlfcn/dlinfo.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* dlinfo -- Get information from the dynamic linker. - Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -58,9 +58,8 @@ dlinfo_doit (void *argsblock) /* Find the highest-addressed object that CALLER is not below. */ for (nsid = 0; nsid < DL_NNS; ++nsid) for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next) - if (caller >= l->l_map_start && caller < l->l_map_end) - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ + if (caller >= l->l_map_start && caller < l->l_map_end + && (l->l_contiguous || _dl_addr_inside_object (l, caller))) break; if (l == NULL) diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-addr.c glibc-2.5-branch/elf/dl-addr.c --- glibc-2.5/elf/dl-addr.c 2006-08-24 13:18:04.000000000 -0700 +++ glibc-2.5-branch/elf/dl-addr.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Locate the shared object symbol nearest a given address. - Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,143 +22,149 @@ #include -int -internal_function -_dl_addr (const void *address, Dl_info *info, - struct link_map **mapp, const ElfW(Sym) **symbolp) +static void +__attribute ((always_inline)) +determine_info (const ElfW(Addr) addr, struct link_map *match, Dl_info *info, + struct link_map **mapp, const ElfW(Sym) **symbolp) { - const ElfW(Addr) addr = DL_LOOKUP_ADDRESS (address); - - /* Protect against concurrent loads and unloads. */ - __rtld_lock_lock_recursive (GL(dl_load_lock)); - - /* Find the highest-addressed object that ADDRESS is not below. */ - struct link_map *match = NULL; - for (Lmid_t ns = 0; ns < 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) - { - /* We know ADDRESS lies within L if in any shared object. - Make sure it isn't past the end of L's segments. */ - size_t n = l->l_phnum; - if (n > 0) - { - do - --n; - while (l->l_phdr[n].p_type != PT_LOAD); - if (addr >= (l->l_addr + - l->l_phdr[n].p_vaddr + l->l_phdr[n].p_memsz)) - /* Off the end of the highest-addressed shared object. */ - continue; - } - - match = l; - break; - } - - int result = 0; - if (match != NULL) + /* Now we know what object the address lies in. */ + info->dli_fname = match->l_name; + info->dli_fbase = (void *) match->l_map_start; + + /* If this is the main program the information is incomplete. */ + if (__builtin_expect (match->l_name[0], 'a') == '\0' + && match->l_type == lt_executable) + info->dli_fname = _dl_argv[0]; + + const ElfW(Sym) *symtab + = (const ElfW(Sym) *) D_PTR (match, l_info[DT_SYMTAB]); + const char *strtab = (const char *) D_PTR (match, l_info[DT_STRTAB]); + + ElfW(Word) strtabsize = match->l_info[DT_STRSZ]->d_un.d_val; + + const ElfW(Sym) *matchsym = NULL; + if (match->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM + + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] != NULL) { - /* Now we know what object the address lies in. */ - info->dli_fname = match->l_name; - info->dli_fbase = (void *) match->l_map_start; - - /* If this is the main program the information is incomplete. */ - if (__builtin_expect (match->l_name[0], 'a') == '\0' - && match->l_type == lt_executable) - info->dli_fname = _dl_argv[0]; - - const ElfW(Sym) *symtab - = (const ElfW(Sym) *) D_PTR (match, l_info[DT_SYMTAB]); - const char *strtab = (const char *) D_PTR (match, l_info[DT_STRTAB]); - - ElfW(Word) strtabsize = match->l_info[DT_STRSZ]->d_un.d_val; - - const ElfW(Sym) *matchsym = NULL; - if (match->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM - + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] != NULL) + /* We look at all symbol table entries referenced by the hash + table. */ + for (Elf_Symndx bucket = 0; bucket < match->l_nbuckets; ++bucket) { - /* We look at all symbol table entries referenced by the - hash table. */ - for (Elf_Symndx bucket = 0; bucket < match->l_nbuckets; ++bucket) + Elf32_Word symndx = match->l_gnu_buckets[bucket]; + if (symndx != 0) { - Elf32_Word symndx = match->l_gnu_buckets[bucket]; - if (symndx != 0) - { - const Elf32_Word *hasharr = &match->l_gnu_chain_zero[symndx]; + const Elf32_Word *hasharr = &match->l_gnu_chain_zero[symndx]; - do - { - /* The hash table never references local symbols - so we can omit that test here. */ - if ((symtab[symndx].st_shndx != SHN_UNDEF - || symtab[symndx].st_value != 0) + do + { + /* The hash table never references local symbols so + we can omit that test here. */ + if ((symtab[symndx].st_shndx != SHN_UNDEF + || symtab[symndx].st_value != 0) #ifdef USE_TLS - && ELFW(ST_TYPE) (symtab[symndx].st_info) != STT_TLS + && ELFW(ST_TYPE) (symtab[symndx].st_info) != STT_TLS #endif - && DL_ADDR_SYM_MATCH (match, &symtab[symndx], - matchsym, addr) - && symtab[symndx].st_name < strtabsize) - matchsym = (ElfW(Sym) *) &symtab[symndx]; - - ++symndx; - } - while ((*hasharr++ & 1u) == 0); + && DL_ADDR_SYM_MATCH (match, &symtab[symndx], + matchsym, addr) + && symtab[symndx].st_name < strtabsize) + matchsym = (ElfW(Sym) *) &symtab[symndx]; + + ++symndx; } + while ((*hasharr++ & 1u) == 0); } } + } + else + { + const ElfW(Sym) *symtabend; + if (match->l_info[DT_HASH] != NULL) + symtabend = (symtab + + ((Elf_Symndx *) D_PTR (match, l_info[DT_HASH]))[1]); else - { - const ElfW(Sym) *symtabend; - if (match->l_info[DT_HASH] != NULL) - symtabend = (symtab - + ((Elf_Symndx *) D_PTR (match, l_info[DT_HASH]))[1]); - else - /* There is no direct way to determine the number of symbols in the - dynamic symbol table and no hash table is present. The ELF - binary is ill-formed but what shall we do? Use the beginning of - the string table which generally follows the symbol table. */ - symtabend = (const ElfW(Sym) *) strtab; - - for (; (void *) symtab < (void *) symtabend; ++symtab) - if ((ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL - || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK) + /* There is no direct way to determine the number of symbols in the + dynamic symbol table and no hash table is present. The ELF + binary is ill-formed but what shall we do? Use the beginning of + the string table which generally follows the symbol table. */ + symtabend = (const ElfW(Sym) *) strtab; + + for (; (void *) symtab < (void *) symtabend; ++symtab) + if ((ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL + || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK) #ifdef USE_TLS - && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS + && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS #endif - && (symtab->st_shndx != SHN_UNDEF - || symtab->st_value != 0) - && DL_ADDR_SYM_MATCH (match, symtab, matchsym, addr) - && symtab->st_name < strtabsize) - matchsym = (ElfW(Sym) *) symtab; - } + && (symtab->st_shndx != SHN_UNDEF + || symtab->st_value != 0) + && DL_ADDR_SYM_MATCH (match, symtab, matchsym, addr) + && symtab->st_name < strtabsize) + matchsym = (ElfW(Sym) *) symtab; + } - if (mapp) - *mapp = match; - if (symbolp) - *symbolp = matchsym; + if (mapp) + *mapp = match; + if (symbolp) + *symbolp = matchsym; - if (matchsym) - { - /* We found a symbol close by. Fill in its name and exact - address. */ - lookup_t matchl = LOOKUP_VALUE (match); + if (matchsym) + { + /* We found a symbol close by. Fill in its name and exact + address. */ + lookup_t matchl = LOOKUP_VALUE (match); - info->dli_sname = strtab + matchsym->st_name; - info->dli_saddr = DL_SYMBOL_ADDRESS (matchl, matchsym); - } - else + info->dli_sname = strtab + matchsym->st_name; + info->dli_saddr = DL_SYMBOL_ADDRESS (matchl, matchsym); + } + else + { + /* No symbol matches. We return only the containing object. */ + info->dli_sname = NULL; + info->dli_saddr = NULL; + } +} + + +int +internal_function +_dl_addr (const void *address, Dl_info *info, + struct link_map **mapp, const ElfW(Sym) **symbolp) +{ + const ElfW(Addr) addr = DL_LOOKUP_ADDRESS (address); + int result = 0; + + /* Protect against concurrent loads and unloads. */ + __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 (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))) { - /* No symbol matches. We return only the containing object. */ - info->dli_sname = NULL; - info->dli_saddr = NULL; + determine_info (addr, l, info, mapp, symbolp); + result = 1; + goto out; } - result = 1; - } - + out: __rtld_lock_unlock_recursive (GL(dl_load_lock)); return result; } libc_hidden_def (_dl_addr) + +/* Return non-zero if ADDR lies within one of L's segments. */ +int +internal_function +_dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) +{ + int n = l->l_phnum; + const ElfW(Addr) reladdr = addr - l->l_addr; + + while (--n >= 0) + if (l->l_phdr[n].p_type == PT_LOAD + && reladdr - l->l_phdr[n].p_vaddr >= 0 + && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) + return 1; + return 0; +} diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-close.c glibc-2.5-branch/elf/dl-close.c --- glibc-2.5/elf/dl-close.c 2006-09-19 07:39:42.000000000 -0700 +++ glibc-2.5-branch/elf/dl-close.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Close a shared object opened by `_dl_open'. - Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -29,12 +30,18 @@ #include #include #include +#include +#include /* Type of the constructor functions. */ typedef void (*fini_t) (void); +/* Special l_idx value used to indicate which objects remain loaded. */ +#define IDX_STILL_USED -1 + + #ifdef USE_TLS /* Returns true we an non-empty was found. */ static bool @@ -101,23 +108,8 @@ remove_slotinfo (size_t idx, struct dtv_ void -_dl_close (void *_map) +_dl_close_worker (struct link_map *map) { - struct link_map *map = _map; - Lmid_t ns = map->l_ns; - unsigned int i; - /* First see whether we can remove the object at all. */ - if (__builtin_expect (map->l_flags_1 & DF_1_NODELETE, 0) - && map->l_init_called) - /* Nope. Do nothing. */ - return; - - if (__builtin_expect (map->l_direct_opencount, 1) == 0) - GLRO(dl_signal_error) (0, map->l_name, NULL, N_("shared object not open")); - - /* Acquire the lock. */ - __rtld_lock_lock_recursive (GL(dl_load_lock)); - /* One less direct use. */ --map->l_direct_opencount; @@ -137,17 +129,19 @@ _dl_close (void *_map) _dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n", map->l_name, map->l_direct_opencount); - __rtld_lock_unlock_recursive (GL(dl_load_lock)); return; } + Lmid_t nsid = map->l_ns; + struct link_namespaces *ns = &GL(dl_ns)[nsid]; + retry: dl_close_state = pending; #ifdef USE_TLS bool any_tls = false; #endif - const unsigned int nloaded = GL(dl_ns)[ns]._ns_nloaded; + const unsigned int nloaded = ns->_ns_nloaded; char used[nloaded]; char done[nloaded]; struct link_map *maps[nloaded]; @@ -155,7 +149,7 @@ _dl_close (void *_map) /* Run over the list and assign indexes to the link maps and enter them into the MAPS array. */ int idx = 0; - for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) + for (struct link_map *l = ns->_ns_loaded; l != NULL; l = l->l_next) { l->l_idx = idx; maps[idx] = l; @@ -188,7 +182,7 @@ _dl_close (void *_map) done[done_index] = 1; used[done_index] = 1; /* Signal the object is still needed. */ - l->l_idx = -1; + l->l_idx = IDX_STILL_USED; /* Mark all dependencies as used. */ if (l->l_initfini != NULL) @@ -196,7 +190,7 @@ _dl_close (void *_map) struct link_map **lp = &l->l_initfini[1]; while (*lp != NULL) { - if ((*lp)->l_idx != -1) + if ((*lp)->l_idx != IDX_STILL_USED) { assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded); @@ -217,7 +211,7 @@ _dl_close (void *_map) { struct link_map *jmap = l->l_reldeps[j]; - if (jmap->l_idx != -1) + if (jmap->l_idx != IDX_STILL_USED) { assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded); @@ -232,20 +226,22 @@ _dl_close (void *_map) } /* Sort the entries. */ - _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nloaded, used, ns); + _dl_sort_fini (ns->_ns_loaded, maps, nloaded, used, nsid); /* Call all termination functions at once. */ #ifdef SHARED - bool do_audit = GLRO(dl_naudit) > 0 && !GL(dl_ns)[ns]._ns_loaded->l_auditing; + bool do_audit = GLRO(dl_naudit) > 0 && !ns->_ns_loaded->l_auditing; #endif bool unload_any = false; + bool scope_mem_left = false; + unsigned int unload_global = 0; unsigned int first_loaded = ~0; - for (i = 0; i < nloaded; ++i) + for (unsigned int i = 0; i < nloaded; ++i) { struct link_map *imap = maps[i]; /* All elements must be in the same namespace. */ - assert (imap->l_ns == ns); + assert (imap->l_ns == nsid); if (!used[i]) { @@ -260,7 +256,7 @@ _dl_close (void *_map) if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", - imap->l_name, ns); + imap->l_name, nsid); if (imap->l_info[DT_FINI_ARRAY] != NULL) { @@ -303,6 +299,9 @@ _dl_close (void *_map) /* We indeed have an object to remove. */ unload_any = true; + if (imap->l_global) + ++unload_global; + /* Remember where the first dynamically loaded object is. */ if (i < first_loaded) first_loaded = i; @@ -310,8 +309,9 @@ _dl_close (void *_map) /* Else used[i]. */ else if (imap->l_type == lt_loaded) { - if (imap->l_searchlist.r_list == NULL - && imap->l_initfini != NULL) + struct r_scope_elem *new_list = NULL; + + if (imap->l_searchlist.r_list == NULL && imap->l_initfini != NULL) { /* The object is still used. But one of the objects we are unloading right now is responsible for loading it. If @@ -328,44 +328,108 @@ _dl_close (void *_map) imap->l_searchlist.r_list = &imap->l_initfini[cnt + 1]; imap->l_searchlist.r_nlist = cnt; - for (cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) - /* This relies on l_scope[] entries being always set either - to its own l_symbolic_searchlist address, or some map's - l_searchlist address. */ - if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) - { - struct link_map *tmap; - - tmap = (struct link_map *) ((char *) imap->l_scope[cnt] - - offsetof (struct link_map, - l_searchlist)); - assert (tmap->l_ns == ns); - if (tmap->l_idx != -1) - { - imap->l_scope[cnt] = &imap->l_searchlist; - break; - } - } + new_list = &imap->l_searchlist; } - else + + /* Count the number of scopes which remain after the unload. + When we add the local search list count it. Always add + one for the terminating NULL pointer. */ + size_t remain = (new_list != NULL) + 1; + bool removed_any = false; + for (size_t cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) + /* This relies on l_scope[] entries being always set either + to its own l_symbolic_searchlist address, or some map's + l_searchlist address. */ + if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) + { + struct link_map *tmap = (struct link_map *) + ((char *) imap->l_scope[cnt] + - offsetof (struct link_map, l_searchlist)); + assert (tmap->l_ns == nsid); + if (tmap->l_idx == IDX_STILL_USED) + ++remain; + else + removed_any = true; + } + else + ++remain; + + if (removed_any) { - unsigned int cnt = 0; - while (imap->l_scope[cnt] != NULL) + /* Always allocate a new array for the scope. This is + necessary since we must be able to determine the last + user of the current array. If possible use the link map's + memory. */ + size_t new_size; + struct r_scope_elem **newp; + +#define SCOPE_ELEMS(imap) \ + (sizeof (imap->l_scope_mem) / sizeof (imap->l_scope_mem[0])) + + if (imap->l_scope != imap->l_scope_mem + && remain < SCOPE_ELEMS (imap)) + { + new_size = SCOPE_ELEMS (imap); + newp = imap->l_scope_mem; + } + else + { + new_size = imap->l_scope_max; + newp = (struct r_scope_elem **) + malloc (new_size * sizeof (struct r_scope_elem *)); + if (newp == NULL) + _dl_signal_error (ENOMEM, "dlclose", NULL, + N_("cannot create scope list")); + } + + /* Copy over the remaining scope elements. */ + remain = 0; + for (size_t cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) { - if (imap->l_scope[cnt] == &map->l_searchlist) + if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) { - while ((imap->l_scope[cnt] = imap->l_scope[cnt + 1]) - != NULL) - ++cnt; - break; + struct link_map *tmap = (struct link_map *) + ((char *) imap->l_scope[cnt] + - offsetof (struct link_map, l_searchlist)); + if (tmap->l_idx != IDX_STILL_USED) + { + /* Remove the scope. Or replace with own map's + scope. */ + if (new_list != NULL) + { + newp[remain++] = new_list; + new_list = NULL; + } + continue; + } } - ++cnt; + + newp[remain++] = imap->l_scope[cnt]; + } + newp[remain] = NULL; + + struct r_scope_elem **old = imap->l_scope; + + imap->l_scope = newp; + + /* No user anymore, we can free it now. */ + if (old != imap->l_scope_mem) + { + if (_dl_scope_free (old)) + /* If _dl_scope_free used THREAD_GSCOPE_WAIT (), + no need to repeat it. */ + scope_mem_left = false; } + else + scope_mem_left = true; + + imap->l_scope_max = new_size; } /* The loader is gone, so mark the object as not having one. - Note: l_idx != -1 -> object will be removed. */ - if (imap->l_loader != NULL && imap->l_loader->l_idx != -1) + Note: l_idx != IDX_STILL_USED -> object will be removed. */ + if (imap->l_loader != NULL + && imap->l_loader->l_idx != IDX_STILL_USED) imap->l_loader = NULL; /* Remember where the first dynamically loaded object is. */ @@ -382,7 +446,7 @@ _dl_close (void *_map) /* Auditing checkpoint: we will start deleting objects. */ if (__builtin_expect (do_audit, 0)) { - struct link_map *head = GL(dl_ns)[ns]._ns_loaded; + struct link_map *head = ns->_ns_loaded; struct audit_ifaces *afct = GLRO(dl_audit); /* Do not call the functions for any auditing object. */ if (head->l_auditing == 0) @@ -399,10 +463,50 @@ _dl_close (void *_map) #endif /* Notify the debugger we are about to remove some loaded objects. */ - struct r_debug *r = _dl_debug_initialize (0, ns); + struct r_debug *r = _dl_debug_initialize (0, nsid); r->r_state = RT_DELETE; _dl_debug_state (); + if (unload_global) + { + /* Some objects are in the global scope list. Remove them. */ + struct r_scope_elem *ns_msl = ns->_ns_main_searchlist; + unsigned int i; + unsigned int j = 0; + unsigned int cnt = ns_msl->r_nlist; + + while (cnt > 0 && ns_msl->r_list[cnt - 1]->l_removed) + --cnt; + + if (cnt + unload_global == ns_msl->r_nlist) + /* Speed up removing most recently added objects. */ + j = cnt; + else + for (i = 0; i < cnt; i++) + if (ns_msl->r_list[i]->l_removed == 0) + { + if (i != j) + ns_msl->r_list[j] = ns_msl->r_list[i]; + j++; + } + ns_msl->r_nlist = j; + } + + if (!RTLD_SINGLE_THREAD_P + && (unload_global + || scope_mem_left + || (GL(dl_scope_free_list) != NULL + && GL(dl_scope_free_list)->count))) + { + struct dl_scope_free_list *fsl; + + THREAD_GSCOPE_WAIT (); + /* Now we can free any queued old scopes. */ + if ((fsl = GL(dl_scope_free_list)) != NULL) + while (fsl->count > 0) + free (fsl->list[--fsl->count]); + } + #ifdef USE_TLS size_t tls_free_start; size_t tls_free_end; @@ -411,7 +515,7 @@ _dl_close (void *_map) /* Check each element of the search list to see if all references to it are gone. */ - for (i = first_loaded; i < nloaded; ++i) + for (unsigned int i = first_loaded; i < nloaded; ++i) { struct link_map *imap = maps[i]; if (!used[i]) @@ -420,23 +524,6 @@ _dl_close (void *_map) /* That was the last reference, and this was a dlopen-loaded object. We can unmap it. */ - if (__builtin_expect (imap->l_global, 0)) - { - /* This object is in the global scope list. Remove it. */ - unsigned int cnt = GL(dl_ns)[ns]._ns_main_searchlist->r_nlist; - - do - --cnt; - while (GL(dl_ns)[ns]._ns_main_searchlist->r_list[cnt] != imap); - - /* The object was already correctly registered. */ - while (++cnt - < GL(dl_ns)[ns]._ns_main_searchlist->r_nlist) - GL(dl_ns)[ns]._ns_main_searchlist->r_list[cnt - 1] - = GL(dl_ns)[ns]._ns_main_searchlist->r_list[cnt]; - - --GL(dl_ns)[ns]._ns_main_searchlist->r_nlist; - } #ifdef USE_TLS /* Remove the object from the dtv slotinfo array if it uses TLS. */ @@ -532,12 +619,12 @@ _dl_close (void *_map) else { #ifdef SHARED - assert (ns != LM_ID_BASE); + assert (nsid != LM_ID_BASE); #endif - GL(dl_ns)[ns]._ns_loaded = imap->l_next; + ns->_ns_loaded = imap->l_next; } - --GL(dl_ns)[ns]._ns_nloaded; + --ns->_ns_nloaded; if (imap->l_next != NULL) imap->l_next->l_prev = imap->l_prev; @@ -601,7 +688,7 @@ _dl_close (void *_map) /* Auditing checkpoint: we have deleted all objects. */ if (__builtin_expect (do_audit, 0)) { - struct link_map *head = GL(dl_ns)[ns]._ns_loaded; + struct link_map *head = ns->_ns_loaded; /* Do not call the functions for any auditing object. */ if (head->l_auditing == 0) { @@ -627,6 +714,30 @@ _dl_close (void *_map) goto retry; dl_close_state = not_pending; +} + + +void +_dl_close (void *_map) +{ + struct link_map *map = _map; + + /* First see whether we can remove the object at all. */ + if (__builtin_expect (map->l_flags_1 & DF_1_NODELETE, 0)) + { + assert (map->l_init_called); + /* Nope. Do nothing. */ + return; + } + + if (__builtin_expect (map->l_direct_opencount, 1) == 0) + GLRO(dl_signal_error) (0, map->l_name, NULL, N_("shared object not open")); + + /* Acquire the lock. */ + __rtld_lock_lock_recursive (GL(dl_load_lock)); + + _dl_close_worker (map); + __rtld_lock_unlock_recursive (GL(dl_load_lock)); } @@ -663,22 +774,22 @@ free_slotinfo (struct dtv_slotinfo_list libc_freeres_fn (free_mem) { - for (Lmid_t ns = 0; ns < DL_NNS; ++ns) - if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0 - && (GL(dl_ns)[ns]._ns_main_searchlist->r_nlist + for (Lmid_t nsid = 0; nsid < 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 == GLRO(dl_initial_searchlist).r_nlist)) { /* All object dynamically loaded by the program are unloaded. Free the memory allocated for the global scope variable. */ - struct link_map **old = GL(dl_ns)[ns]._ns_main_searchlist->r_list; + struct link_map **old = GL(dl_ns)[nsid]._ns_main_searchlist->r_list; /* Put the old map in. */ - GL(dl_ns)[ns]._ns_main_searchlist->r_list + GL(dl_ns)[nsid]._ns_main_searchlist->r_list // XXX Check whether we need NS-specific initial_searchlist = GLRO(dl_initial_searchlist).r_list; /* Signal that the original map is used. */ - GL(dl_ns)[ns]._ns_global_scope_alloc = 0; + GL(dl_ns)[nsid]._ns_global_scope_alloc = 0; /* Now free the old map. */ free (old); @@ -702,4 +813,8 @@ libc_freeres_fn (free_mem) free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next); } #endif + + void *scope_free_list = GL(dl_scope_free_list); + GL(dl_scope_free_list) = NULL; + free (scope_free_list); } diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-debug.c glibc-2.5-branch/elf/dl-debug.c --- glibc-2.5/elf/dl-debug.c 2006-02-28 22:18:30.000000000 -0800 +++ glibc-2.5-branch/elf/dl-debug.c 2007-01-12 06:54:57.000000000 -0800 @@ -54,7 +54,7 @@ _dl_debug_initialize (ElfW(Addr) ldbase, else r = &GL(dl_ns)[ns]._ns_debug; - if (r->r_brk == 0 || ldbase != 0) + if (r->r_map == NULL || ldbase != 0) { /* Tell the debugger where to find the map of loaded objects. */ r->r_version = 1 /* R_DEBUG_VERSION XXX */; diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-dst.h glibc-2.5-branch/elf/dl-dst.h --- glibc-2.5/elf/dl-dst.h 2006-05-09 14:44:31.000000000 -0700 +++ glibc-2.5-branch/elf/dl-dst.h 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,6 @@ /* Handling of dynamic sring tokens. - Copyright (C) 1999,2001,2002,2003,2004,2006 Free Software Foundation, Inc. + Copyright (C) 1999,2001,2002,2003,2004,2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -50,7 +51,7 @@ \ First get the origin string if it is not available yet. \ This can only happen for the map of the executable. */ \ - DL_DST_REQ_STATIC \ + DL_DST_REQ_STATIC (l) \ if ((l)->l_origin == NULL) \ { \ assert ((l)->l_name[0] == '\0'); \ @@ -68,9 +69,9 @@ __len; }) #ifdef SHARED -# define DL_DST_REQ_STATIC /* nothing */ +# define DL_DST_REQ_STATIC(l) /* nothing */ #else -# define DL_DST_REQ_STATIC \ +# define DL_DST_REQ_STATIC(l) \ if ((l) == NULL) \ { \ const char *origin = _dl_get_origin (); \ diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-iteratephdr.c glibc-2.5-branch/elf/dl-iteratephdr.c --- glibc-2.5/elf/dl-iteratephdr.c 2006-02-28 22:18:33.000000000 -0800 +++ glibc-2.5-branch/elf/dl-iteratephdr.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Get loaded objects program headers. - Copyright (C) 2001,2002,2003,2004,2006 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2001. @@ -54,9 +54,9 @@ __dl_iterate_phdr (int (*callback) (stru nloaded += GL(dl_ns)[cnt]._ns_nloaded; if (caller >= (const void *) l->l_map_start - && caller < (const void *) l->l_map_end) - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ + && caller < (const void *) l->l_map_end + && (l->l_contiguous + || _dl_addr_inside_object (l, (ElfW(Addr)) caller))) ns = cnt; } diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-load.c glibc-2.5-branch/elf/dl-load.c --- glibc-2.5/elf/dl-load.c 2006-08-28 18:43:42.000000000 -0700 +++ glibc-2.5-branch/elf/dl-load.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Map in a shared object's segments from the file. - Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -511,7 +511,7 @@ fillin_rpath (char *rpath, struct r_sear } -static void +static bool internal_function decompose_rpath (struct r_search_path_struct *sps, const char *rpath, struct link_map *l, const char *what) @@ -546,19 +546,8 @@ decompose_rpath (struct r_search_path_st { /* This object is on the list of objects for which the RUNPATH and RPATH must not be used. */ - result = calloc (1, sizeof *result); - if (result == NULL) - { - signal_error_cache: - errstring = N_("cannot create cache for search path"); - signal_error: - _dl_signal_error (ENOMEM, NULL, NULL, errstring); - } - - sps->dirs = result; - sps->malloced = 1; - - return; + sps->dirs = (void *) -1; + return false; } while (*inhp != '\0') @@ -588,7 +577,11 @@ decompose_rpath (struct r_search_path_st result = (struct r_search_path_elem **) malloc ((nelems + 1 + 1) * sizeof (*result)); if (result == NULL) - goto signal_error_cache; + { + errstring = N_("cannot create cache for search path"); + signal_error: + _dl_signal_error (ENOMEM, NULL, NULL, errstring); + } fillin_rpath (copy, result, ":", 0, what, where); @@ -599,6 +592,7 @@ decompose_rpath (struct r_search_path_st sps->dirs = result; /* The caller will change this value if we haven't used a real malloc. */ sps->malloced = 1; + return true; } /* Make sure cached path information is stored in *SP @@ -623,10 +617,9 @@ cache_rpath (struct link_map *l, } /* Make sure the cache information is available. */ - decompose_rpath (sp, (const char *) (D_PTR (l, l_info[DT_STRTAB]) - + l->l_info[tag]->d_un.d_val), - l, what); - return true; + return decompose_rpath (sp, (const char *) (D_PTR (l, l_info[DT_STRTAB]) + + l->l_info[tag]->d_un.d_val), + l, what); } @@ -1232,6 +1225,8 @@ cannot allocate TLS data structures for loadcmds[nloadcmds - 1].mapstart - c->mapend, PROT_NONE); + l->l_contiguous = 1; + goto postmap; } @@ -1251,6 +1246,7 @@ cannot allocate TLS data structures for /* Remember which part of the address space this object uses. */ l->l_map_start = c->mapstart + l->l_addr; l->l_map_end = l->l_map_start + maplength; + l->l_contiguous = !has_holes; while (c < &loadcmds[nloadcmds]) { diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-lookup.c glibc-2.5-branch/elf/dl-lookup.c --- glibc-2.5/elf/dl-lookup.c 2006-07-10 14:49:38.000000000 -0700 +++ glibc-2.5-branch/elf/dl-lookup.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Look up a symbol in the loaded objects. - Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006, 2007 Free Software 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 #include #include +#include #include #include @@ -200,14 +201,17 @@ add_dependency (struct link_map *undef_m static void internal_function _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, - const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[], - struct sym_val *value, + const ElfW(Sym) **ref, struct sym_val *value, const struct r_found_version *version, int type_class, int protected); /* Search loaded objects' symbol tables for a definition of the symbol - UNDEF_NAME, perhaps with a requested version for the symbol. */ + UNDEF_NAME, perhaps with a requested version for the symbol. + + We must never have calls to the audit functions inside this function + or in any function which gets called. If this would happen the audit + code might create a thread which can throw off all the scope locking. */ lookup_t internal_function _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, @@ -225,17 +229,13 @@ _dl_lookup_symbol_x (const char *undef_n /* No other flag than DL_LOOKUP_ADD_DEPENDENCY is allowed if we look up a versioned symbol. */ - assert (version == NULL || flags == 0 || flags == DL_LOOKUP_ADD_DEPENDENCY); + assert (version == NULL || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY)) == 0); size_t i = 0; if (__builtin_expect (skip_map != NULL, 0)) - { - /* Search the relevant loaded objects for a definition. */ - while ((*scope)->r_list[i] != skip_map) - ++i; - - assert (i < (*scope)->r_nlist); - } + /* Search the relevant loaded objects for a definition. */ + while ((*scope)->r_list[i] != skip_map) + ++i; /* Search the relevant loaded objects for a definition. */ for (size_t start = i; *scope != NULL; start = 0, ++scope) @@ -338,16 +338,15 @@ _dl_lookup_symbol_x (const char *undef_n && add_dependency (undef_map, current_value.m) < 0) /* Something went wrong. Perhaps the object we tried to reference was just removed. Try finding another definition. */ - return _dl_lookup_symbol_x (undef_name, undef_map, ref, - symbol_scope, version, type_class, - flags, skip_map); + return _dl_lookup_symbol_x (undef_name, undef_map, ref, symbol_scope, + version, type_class, flags, skip_map); /* The object is used. */ current_value.m->l_used = 1; if (__builtin_expect (GLRO(dl_debug_mask) & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0)) - _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope, + _dl_debug_bindings (undef_name, undef_map, ref, ¤t_value, version, type_class, protected); *ref = current_value.s; @@ -404,8 +403,7 @@ _dl_setup_hash (struct link_map *map) static void internal_function _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, - const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[], - struct sym_val *value, + const ElfW(Sym) **ref, struct sym_val *value, const struct r_found_version *version, int type_class, int protected) { diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-minimal.c glibc-2.5-branch/elf/dl-minimal.c --- glibc-2.5/elf/dl-minimal.c 2005-12-17 15:08:29.000000000 -0800 +++ glibc-2.5-branch/elf/dl-minimal.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,6 @@ /* Minimal replacements for basic facilities used in the dynamic linker. - Copyright (C) 1995-1998,2000-2002,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2000-2002,2004-2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -74,14 +75,21 @@ __libc_memalign (size_t align, size_t n) alloc_ptr = (void *) 0 + (((alloc_ptr - (void *) 0) + align - 1) & ~(align - 1)); - if (alloc_ptr + n >= alloc_end) + if (alloc_ptr + n >= alloc_end || n >= -(uintptr_t) alloc_ptr) { /* Insufficient space left; allocate another page. */ caddr_t page; size_t nup = (n + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1); + if (__builtin_expect (nup == 0, 0)) + { + if (n) + return NULL; + nup = GLRO(dl_pagesize); + } page = __mmap (0, nup, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, _dl_zerofd, 0); - assert (page != MAP_FAILED); + if (page == MAP_FAILED) + return NULL; if (page != alloc_end) alloc_ptr = page; alloc_end = page + nup; @@ -107,7 +115,14 @@ calloc (size_t nmemb, size_t size) /* New memory from the trivial malloc above is always already cleared. (We make sure that's true in the rare occasion it might not be, by clearing memory in free, below.) */ - return malloc (nmemb * size); + size_t bytes = nmemb * size; + +#define HALF_SIZE_T (((size_t) 1) << (8 * sizeof (size_t) / 2)) + if (__builtin_expect ((nmemb | size) >= HALF_SIZE_T, 0) + && size != 0 && bytes / size != nmemb) + return NULL; + + return malloc (bytes); } /* This will rarely be called. */ @@ -128,14 +143,13 @@ free (void *ptr) void * weak_function realloc (void *ptr, size_t n) { - void *new; if (ptr == NULL) return malloc (n); assert (ptr == alloc_last_block); + size_t old_size = alloc_ptr - alloc_last_block; alloc_ptr = alloc_last_block; - new = malloc (n); - assert (new == ptr); - return new; + void *new = malloc (n); + return new != ptr ? memcpy (new, ptr, old_size) : new; } /* Avoid signal frobnication in setjmp/longjmp. Keeps things smaller. */ @@ -264,7 +278,7 @@ __strtoul_internal (const char *nptr, ch while (*nptr >= '0' && *nptr <= '9') { unsigned long int digval = *nptr - '0'; - if (result > LONG_MAX / 10 + if (result > ULONG_MAX / 10 || (result == ULONG_MAX / 10 && digval > ULONG_MAX % 10)) { errno = ERANGE; diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-open.c glibc-2.5-branch/elf/dl-open.c --- glibc-2.5/elf/dl-open.c 2006-08-28 15:56:50.000000000 -0700 +++ glibc-2.5-branch/elf/dl-open.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Load a shared object at runtime, relocate it, and run its initializer. - Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006, 2007 Free Software 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,6 +31,8 @@ #include #include #include +#include +#include #include @@ -96,17 +98,17 @@ add_to_global (struct link_map *new) in an realloc() call. Therefore we allocate a completely new array the first time we have to add something to the locale scope. */ - if (GL(dl_ns)[new->l_ns]._ns_global_scope_alloc == 0) + struct link_namespaces *ns = &GL(dl_ns)[new->l_ns]; + if (ns->_ns_global_scope_alloc == 0) { /* This is the first dynamic object given global scope. */ - GL(dl_ns)[new->l_ns]._ns_global_scope_alloc - = GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_nlist + to_add + 8; + ns->_ns_global_scope_alloc + = ns->_ns_main_searchlist->r_nlist + to_add + 8; new_global = (struct link_map **) - malloc (GL(dl_ns)[new->l_ns]._ns_global_scope_alloc - * sizeof (struct link_map *)); + malloc (ns->_ns_global_scope_alloc * sizeof (struct link_map *)); if (new_global == NULL) { - GL(dl_ns)[new->l_ns]._ns_global_scope_alloc = 0; + ns->_ns_global_scope_alloc = 0; nomem: _dl_signal_error (ENOMEM, new->l_libname->name, NULL, N_("cannot extend global scope")); @@ -114,29 +116,39 @@ add_to_global (struct link_map *new) } /* Copy over the old entries. */ - GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list - = memcpy (new_global, - GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list, - (GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_nlist + ns->_ns_main_searchlist->r_list + = memcpy (new_global, ns->_ns_main_searchlist->r_list, + (ns->_ns_main_searchlist->r_nlist * sizeof (struct link_map *))); } - else if (GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_nlist + to_add - > GL(dl_ns)[new->l_ns]._ns_global_scope_alloc) + else if (ns->_ns_main_searchlist->r_nlist + to_add + > ns->_ns_global_scope_alloc) { /* We have to extend the existing array of link maps in the main map. */ + struct link_map **old_global + = GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list; + size_t new_nalloc = ((ns->_ns_global_scope_alloc + to_add) * 2); + new_global = (struct link_map **) - realloc (GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list, - ((GL(dl_ns)[new->l_ns]._ns_global_scope_alloc + to_add + 8) - * sizeof (struct link_map *))); + malloc (new_nalloc * sizeof (struct link_map *)); if (new_global == NULL) goto nomem; - GL(dl_ns)[new->l_ns]._ns_global_scope_alloc += to_add + 8; - GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list = new_global; + memcpy (new_global, old_global, + ns->_ns_global_scope_alloc * sizeof (struct link_map *)); + + ns->_ns_global_scope_alloc = new_nalloc; + ns->_ns_main_searchlist->r_list = new_global; + + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_WAIT (); + + free (old_global); } /* Now add the new entries. */ + unsigned int new_nlist = ns->_ns_main_searchlist->r_nlist; for (cnt = 0; cnt < new->l_searchlist.r_nlist; ++cnt) { struct link_map *map = new->l_searchlist.r_list[cnt]; @@ -144,15 +156,49 @@ add_to_global (struct link_map *new) if (map->l_global == 0) { map->l_global = 1; - GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_list[GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_nlist] - = map; - ++GL(dl_ns)[new->l_ns]._ns_main_searchlist->r_nlist; + ns->_ns_main_searchlist->r_list[new_nlist++] = map; } } + atomic_write_barrier (); + ns->_ns_main_searchlist->r_nlist = new_nlist; return 0; } +int +_dl_scope_free (struct r_scope_elem **old) +{ + struct dl_scope_free_list *fsl; +#define DL_SCOPE_FREE_LIST_SIZE (sizeof (fsl->list) / sizeof (fsl->list[0])) + + if (RTLD_SINGLE_THREAD_P) + free (old); + else if ((fsl = GL(dl_scope_free_list)) == NULL) + { + GL(dl_scope_free_list) = fsl = malloc (sizeof (*fsl)); + if (fsl == NULL) + { + THREAD_GSCOPE_WAIT (); + free (old); + return 1; + } + else + { + fsl->list[0] = old; + fsl->count = 1; + } + } + else if (fsl->count < DL_SCOPE_FREE_LIST_SIZE) + fsl->list[fsl->count++] = old; + else + { + THREAD_GSCOPE_WAIT (); + while (fsl->count > 0) + free (fsl->list[--fsl->count]); + return 1; + } + return 0; +} static void dl_open_worker (void *a) @@ -160,7 +206,7 @@ dl_open_worker (void *a) struct dl_open_args *args = a; const char *file = args->file; int mode = args->mode; - struct link_map *new, *l; + struct link_map *new; int lazy; unsigned int i; #ifdef USE_TLS @@ -187,13 +233,14 @@ dl_open_worker (void *a) By default we assume this is the main application. */ call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; + struct link_map *l; for (Lmid_t ns = 0; ns < 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) + && caller_dlopen < (const void *) l->l_map_end + && (l->l_contiguous + || _dl_addr_inside_object (l, (ElfW(Addr)) caller_dlopen))) { - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ assert (ns == l->l_ns); call_map = l; goto found_caller; @@ -326,7 +373,7 @@ dl_open_worker (void *a) /* Relocate the objects loaded. We do this in reverse order so that copy relocs of earlier objects overwrite the data written by later objects. */ - l = new; + struct link_map *l = new; while (l->l_next) l = l->l_next; while (1) @@ -379,6 +426,8 @@ dl_open_worker (void *a) while (*runp != NULL) { + if (*runp == &new->l_searchlist) + break; ++cnt; ++runp; } @@ -391,35 +440,45 @@ dl_open_worker (void *a) { /* The 'r_scope' array is too small. Allocate a new one dynamically. */ + size_t new_size; struct r_scope_elem **newp; - size_t new_size = imap->l_scope_max * 2; - if (imap->l_scope == imap->l_scope_mem) +#define SCOPE_ELEMS(imap) \ + (sizeof (imap->l_scope_mem) / sizeof (imap->l_scope_mem[0])) + + if (imap->l_scope != imap->l_scope_mem + && imap->l_scope_max < SCOPE_ELEMS (imap)) { - newp = (struct r_scope_elem **) - malloc (new_size * sizeof (struct r_scope_elem *)); - if (newp == NULL) - _dl_signal_error (ENOMEM, "dlopen", NULL, - N_("cannot create scope list")); - imap->l_scope = memcpy (newp, imap->l_scope, - cnt * sizeof (imap->l_scope[0])); + new_size = SCOPE_ELEMS (imap); + newp = imap->l_scope_mem; } else { + new_size = imap->l_scope_max * 2; newp = (struct r_scope_elem **) - realloc (imap->l_scope, - new_size * sizeof (struct r_scope_elem *)); + malloc (new_size * sizeof (struct r_scope_elem *)); if (newp == NULL) _dl_signal_error (ENOMEM, "dlopen", NULL, N_("cannot create scope list")); - imap->l_scope = newp; } + memcpy (newp, imap->l_scope, cnt * sizeof (imap->l_scope[0])); + struct r_scope_elem **old = imap->l_scope; + + imap->l_scope = newp; + + if (old != imap->l_scope_mem) + _dl_scope_free (old); + imap->l_scope_max = new_size; } - imap->l_scope[cnt++] = &new->l_searchlist; - imap->l_scope[cnt] = NULL; + /* First terminate the extended list. Otherwise a thread + might use the new last element and then use the garbage + at offset IDX+1. */ + imap->l_scope[cnt + 1] = NULL; + atomic_write_barrier (); + imap->l_scope[cnt] = &new->l_searchlist; } #if USE_TLS /* Only add TLS memory if this object is loaded now and @@ -547,15 +606,9 @@ no more namespaces available for dlmopen _dl_unload_cache (); #endif - /* Release the lock. */ - __rtld_lock_unlock_recursive (GL(dl_load_lock)); - + /* See if an error occurred during loading. */ if (__builtin_expect (errstring != NULL, 0)) { - /* Some error occurred during loading. */ - char *local_errstring; - size_t len_errstring; - /* Remove the object from memory. It may be in an inconsistent state if relocation failed, for example. */ if (args.map) @@ -572,12 +625,18 @@ no more namespaces available for dlmopen GL(dl_tls_dtv_gaps) = true; #endif - _dl_close (args.map); + _dl_close_worker (args.map); } + assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT); + + /* Release the lock. */ + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + /* Make a local copy of the error string so that we can release the memory allocated for it. */ - len_errstring = strlen (errstring) + 1; + size_t len_errstring = strlen (errstring) + 1; + char *local_errstring; if (objname == errstring + len_errstring) { size_t total_len = len_errstring + strlen (objname) + 1; @@ -594,14 +653,15 @@ no more namespaces available for dlmopen if (malloced) free ((char *) errstring); - assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT); - /* Reraise the error. */ _dl_signal_error (errcode, objname, NULL, local_errstring); } assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT); + /* Release the lock. */ + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + #ifndef SHARED DL_STATIC_INIT (args.map); #endif @@ -637,3 +697,21 @@ show_scope (struct link_map *new) } } #endif + +#ifdef IS_IN_rtld +/* Return non-zero if ADDR lies within one of L's segments. */ +int +internal_function +_dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) +{ + int n = l->l_phnum; + const ElfW(Addr) reladdr = addr - l->l_addr; + + while (--n >= 0) + if (l->l_phdr[n].p_type == PT_LOAD + && reladdr - l->l_phdr[n].p_vaddr >= 0 + && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) + return 1; + return 0; +} +#endif diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-runtime.c glibc-2.5-branch/elf/dl-runtime.c --- glibc-2.5/elf/dl-runtime.c 2005-02-07 14:47:00.000000000 -0800 +++ glibc-2.5-branch/elf/dl-runtime.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* On-demand PLT fixup for shared objects. - Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,7 +24,10 @@ #include #include #include +#include #include "dynamic-link.h" +#include + #if (!defined ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \ || ELF_MACHINE_NO_REL @@ -92,16 +95,26 @@ _dl_fixup ( version = NULL; } - result = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, - l->l_scope, version, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); + /* We need to keep the scope around so do some locking. This is + not necessary for objects which cannot be unloaded or when + we are not using any threads (yet). */ + int flags = DL_LOOKUP_ADD_DEPENDENCY; + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_SET_FLAG (); + + result = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, l->l_scope, + version, ELF_RTYPE_CLASS_PLT, flags, NULL); + + /* We are done with the global scope. */ + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_RESET_FLAG (); /* Currently result contains the base load address (or link map) of the object that defines sym. Now add in the symbol offset. */ value = DL_FIXUP_MAKE_VALUE (result, - sym ? LOOKUP_VALUE_ADDRESS (result) - + sym->st_value : 0); + sym ? (LOOKUP_VALUE_ADDRESS (result) + + sym->st_value) : 0); } else { @@ -174,10 +187,20 @@ _dl_profile_fixup ( version = NULL; } - result = _dl_lookup_symbol_x (strtab + refsym->st_name, l, &defsym, - l->l_scope, version, - ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); + /* We need to keep the scope around so do some locking. This is + not necessary for objects which cannot be unloaded or when + we are not using any threads (yet). */ + int flags = DL_LOOKUP_ADD_DEPENDENCY; + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_SET_FLAG (); + + result = _dl_lookup_symbol_x (strtab + refsym->st_name, l, + &defsym, l->l_scope, version, + ELF_RTYPE_CLASS_PLT, flags, NULL); + + /* We are done with the global scope. */ + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_RESET_FLAG (); /* Currently result contains the base load address (or link map) of the object that defines sym. Now add in the symbol diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-support.c glibc-2.5-branch/elf/dl-support.c --- glibc-2.5/elf/dl-support.c 2005-05-11 10:27:22.000000000 -0700 +++ glibc-2.5-branch/elf/dl-support.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Support for dynamic linking code in static libc. - Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -133,6 +134,11 @@ int (*_dl_make_stack_executable_hook) (v = _dl_make_stack_executable; +/* Function in libpthread to wait for termination of lookups. */ +void (*_dl_wait_lookup_done) (void); + +struct dl_scope_free_list *_dl_scope_free_list; + #ifdef NEED_DL_SYSINFO /* Needed for improved syscall handling on at least x86/Linux. */ uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT; diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-sym.c glibc-2.5-branch/elf/dl-sym.c --- glibc-2.5/elf/dl-sym.c 2006-02-26 12:48:48.000000000 -0800 +++ glibc-2.5-branch/elf/dl-sym.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Look up a symbol in a shared object loaded by `dlopen'. - Copyright (C) 1999,2000,2001,2002,2004,2006 Free Software Foundation, Inc. + Copyright (C) 1999-2002,2004,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #ifdef USE_TLS # include #endif @@ -58,6 +60,29 @@ _dl_tls_symaddr (struct link_map *map, c #endif +struct call_dl_lookup_args +{ + /* Arguments to do_dlsym. */ + struct link_map *map; + const char *name; + struct r_found_version *vers; + int flags; + + /* Return values of do_dlsym. */ + lookup_t loadbase; + const ElfW(Sym) **refp; +}; + +static void +call_dl_lookup (void *ptr) +{ + struct call_dl_lookup_args *args = (struct call_dl_lookup_args *) ptr; + args->map = GLRO(dl_lookup_symbol_x) (args->name, args->map, args->refp, + args->map->l_scope, args->vers, 0, + args->flags, NULL); +} + + static void * internal_function do_sym (void *handle, const char *name, void *who, @@ -75,19 +100,59 @@ do_sym (void *handle, const char *name, for (Lmid_t ns = 0; ns < 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) + if (caller >= l->l_map_start && caller < l->l_map_end + && (l->l_contiguous || _dl_addr_inside_object (l, caller))) { - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ match = l; break; } if (handle == RTLD_DEFAULT) - /* Search the global scope. */ - result = GLRO(dl_lookup_symbol_x) (name, match, &ref, match->l_scope, - vers, 0, flags|DL_LOOKUP_ADD_DEPENDENCY, - NULL); + { + /* Search the global scope. We have the simple case where + we look up in the scope of an object which was part of + the initial binary. And then the more complex part + where the object is dynamically loaded and the scope + array can change. */ + if (RTLD_SINGLE_THREAD_P) + result = GLRO(dl_lookup_symbol_x) (name, match, &ref, + match->l_scope, vers, 0, + flags | DL_LOOKUP_ADD_DEPENDENCY, + NULL); + else + { + struct call_dl_lookup_args args; + args.name = name; + args.map = match; + args.vers = vers; + args.flags = flags | DL_LOOKUP_ADD_DEPENDENCY; + args.refp = &ref; + + THREAD_GSCOPE_SET_FLAG (); + + const char *objname; + const char *errstring = NULL; + bool malloced; + int err = GLRO(dl_catch_error) (&objname, &errstring, &malloced, + call_dl_lookup, &args); + + THREAD_GSCOPE_RESET_FLAG (); + + if (__builtin_expect (errstring != NULL, 0)) + { + /* The lookup was unsuccessful. Rethrow the error. */ + char *errstring_dup = strdupa (errstring); + char *objname_dup = strdupa (objname); + if (malloced) + free ((char *) errstring); + + GLRO(dl_signal_error) (err, objname_dup, NULL, errstring_dup); + /* NOTREACHED */ + } + + result = args.map; + } + } else if (handle == RTLD_NEXT) { if (__builtin_expect (match == GL(dl_ns)[LM_ID_BASE]._ns_loaded, 0)) diff -pNur -x CVS -x libidn glibc-2.5/elf/dl-sysdep.c glibc-2.5-branch/elf/dl-sysdep.c --- glibc-2.5/elf/dl-sysdep.c 2005-12-14 00:36:14.000000000 -0800 +++ glibc-2.5-branch/elf/dl-sysdep.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Operating system support for run-time dynamic linker. Generic Unix version. - Copyright (C) 1995-1998, 2000-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -477,9 +477,21 @@ _dl_important_hwcaps (const char *platfo total = temp[0].len + 1; else { - total = (1UL << (cnt - 2)) * (temp[0].len + temp[cnt - 1].len + 2); - for (n = 1; n + 1 < cnt; ++n) - total += (1UL << (cnt - 3)) * (temp[n].len + 1); + total = temp[0].len + temp[cnt - 1].len + 2; + if (cnt > 2) + { + total <<= 1; + for (n = 1; n + 1 < cnt; ++n) + total += temp[n].len + 1; + if (cnt > 3 + && (cnt >= sizeof (size_t) * 8 + || total + (sizeof (*result) << 3) + >= (1UL << (sizeof (size_t) * 8 - cnt + 3)))) + _dl_signal_error (ENOMEM, NULL, NULL, + N_("cannot create capability list")); + + total <<= cnt - 3; + } } /* The result structure: we use a very compressed way to store the diff -pNur -x CVS -x libidn glibc-2.5/elf/do-lookup.h glibc-2.5-branch/elf/do-lookup.h --- glibc-2.5/elf/do-lookup.h 2006-09-04 13:40:11.000000000 -0700 +++ glibc-2.5-branch/elf/do-lookup.h 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Look up a symbol in the loaded objects. - Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,8 +29,13 @@ do_lookup_x (const char *undef_name, uin const struct r_found_version *const version, int flags, struct link_map *skip, int type_class) { - struct link_map **list = scope->r_list; size_t n = scope->r_nlist; + /* Make sure we read the value before proceeding. Otherwise we + might use r_list pointing to the initial scope and r_nlist being + the value after a resize. That is the only path in dl-open.c not + protected by GSCOPE. A read barrier here might be to expensive. */ + __asm volatile ("" : "+r" (n), "+m" (scope->r_list)); + struct link_map **list = scope->r_list; do { diff -pNur -x CVS -x libidn glibc-2.5/elf/ldconfig.c glibc-2.5-branch/elf/ldconfig.c --- glibc-2.5/elf/ldconfig.c 2006-04-06 23:57:49.000000000 -0700 +++ glibc-2.5-branch/elf/ldconfig.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1999-2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -706,10 +706,10 @@ search_dir (const struct dir_entry *entr + 1, ".#prelink#.", sizeof (".#prelink#.") - 1) == 0) continue; } - len += strlen (entry->path); + len += strlen (entry->path) + 2; if (len > file_name_len) { - file_name_len = len + 1; + file_name_len = len; file_name = alloca (file_name_len); if (!opt_chroot) real_file_name = file_name; @@ -717,10 +717,10 @@ search_dir (const struct dir_entry *entr sprintf (file_name, "%s/%s", entry->path, direntry->d_name); if (opt_chroot) { - len = strlen (dir_name) + strlen (direntry->d_name); + len = strlen (dir_name) + strlen (direntry->d_name) + 2; if (len > real_file_name_len) { - real_file_name_len = len + 1; + real_file_name_len = len; real_file_name = alloca (real_file_name_len); } sprintf (real_file_name, "%s/%s", dir_name, direntry->d_name); diff -pNur -x CVS -x libidn glibc-2.5/elf/Makefile glibc-2.5-branch/elf/Makefile --- glibc-2.5/elf/Makefile 2006-09-19 07:41:41.000000000 -0700 +++ glibc-2.5-branch/elf/Makefile 2007-01-12 07:21:33.000000000 -0800 @@ -171,7 +171,7 @@ tests += loadtest restest1 preloadtest l tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \ tst-audit1 tst-audit2 \ - tst-stackguard1 tst-addr1 + tst-stackguard1 tst-addr1 tst-thrlock # reldep9 test-srcs = tst-pathopt tests-vis-yes = vismain @@ -916,3 +916,5 @@ $(objpfx)tst-leaks1-mem: $(objpfx)tst-le tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace $(objpfx)tst-addr1: $(libdl) + +$(objpfx)tst-thrlock: $(libdl) $(shared-thread-library) diff -pNur -x CVS -x libidn glibc-2.5/elf/rtld.c glibc-2.5-branch/elf/rtld.c --- glibc-2.5/elf/rtld.c 2006-09-29 09:56:15.000000000 -0700 +++ glibc-2.5-branch/elf/rtld.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Run time dynamic linker. - Copyright (C) 1995-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -1414,6 +1414,12 @@ ld.so does not support TLS, but program /* Iterate over all entries in the list. The order is important. */ struct audit_ifaces *last_audit = NULL; struct audit_list *al = audit_list->next; + +#ifdef USE_TLS + /* Since we start using the auditing DSOs right away we need to + initialize the data structures now. */ + tcbp = init_tls (); +#endif do { #ifdef USE_TLS @@ -1424,10 +1430,6 @@ ld.so does not support TLS, but program always allocate the static block, we never defer it even if no DF_STATIC_TLS bit is set. The reason is that we know glibc will use the static model. */ - - /* Since we start using the auditing DSOs right away we need to - initialize the data structures now. */ - tcbp = init_tls (); #endif struct dlmopen_args dlmargs; dlmargs.fname = al->name; @@ -2087,7 +2089,8 @@ ERROR: ld.so: object '%s' cannot be load } if (main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)] - && ! __builtin_expect (GLRO(dl_profile) != NULL, 0)) + && ! __builtin_expect (GLRO(dl_profile) != NULL, 0) + && ! __builtin_expect (GLRO(dl_dynamic_weak), 0)) { ElfW(Lib) *liblist, *liblistend; struct link_map **r_list, **r_listend, *l; @@ -2142,7 +2145,6 @@ ERROR: ld.so: object '%s' cannot be load /* Now set up the variable which helps the assembler startup code. */ GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist = &main_map->l_searchlist; - GL(dl_ns)[LM_ID_BASE]._ns_global_scope[0] = &main_map->l_searchlist; /* Save the information about the original global scope list since we need it in the memory handling later. */ diff -pNur -x CVS -x libidn glibc-2.5/elf/tst-thrlock.c glibc-2.5-branch/elf/tst-thrlock.c --- glibc-2.5/elf/tst-thrlock.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/elf/tst-thrlock.c 2007-01-12 07:21:33.000000000 -0800 @@ -0,0 +1,55 @@ +#include +#include +#include +#include +#include +#include + +static void * +tf (void *arg) +{ + void *h = dlopen (LIBM_SO, RTLD_LAZY); + if (h == NULL) + { + printf ("dlopen failed: %s\n", dlerror ()); + exit (1); + } + if (dlsym (h, "sin") == NULL) + { + printf ("dlsym failed: %s\n", dlerror ()); + exit (1); + } + if (dlclose (h) != 0) + { + printf ("dlclose failed: %s\n", dlerror ()); + exit (1); + } + return NULL; +} + +int +main (void) +{ +#define N 10 + pthread_t th[N]; + for (int i = 0; i < N; ++i) + { + int e = pthread_create (&th[i], NULL, tf, NULL); + if (e != 0) + { + printf ("pthread_create failed with %d (%s)\n", e, strerror (e)); + return 1; + } + } + for (int i = 0; i < N; ++i) + { + void *res; + int e = pthread_join (th[i], &res); + if (e != 0 || res != NULL) + { + puts ("thread failed"); + return 1; + } + } + return 0; +} diff -pNur -x CVS -x libidn glibc-2.5/iconv/gconv_charset.h glibc-2.5-branch/iconv/gconv_charset.h --- glibc-2.5/iconv/gconv_charset.h 2005-12-20 23:27:27.000000000 -0800 +++ glibc-2.5-branch/iconv/gconv_charset.h 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Charset name normalization. - Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2003,2004,2005,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -30,7 +30,7 @@ strip (char *wp, const char *s) while (*s != '\0') { if (__isalnum_l (*s, _nl_C_locobj_ptr) - || *s == '_' || *s == '-' || *s == '.' || *s == ',') + || *s == '_' || *s == '-' || *s == '.' || *s == ',' || *s == ':') *wp++ = __toupper_l (*s, _nl_C_locobj_ptr); else if (*s == '/') { diff -pNur -x CVS -x libidn glibc-2.5/iconv/iconv_open.c glibc-2.5-branch/iconv/iconv_open.c --- glibc-2.5/iconv/iconv_open.c 2001-11-28 20:57:52.000000000 -0800 +++ glibc-2.5-branch/iconv/iconv_open.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Get descriptor for character set conversion. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2000,2001,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -38,7 +38,7 @@ iconv_open (const char *tocode, const ch int res; /* Normalize the name. We remove all characters beside alpha-numeric, - '_', '-', '/', and '.'. */ + '_', '-', '/', '.', and ':'. */ tocode_len = strlen (tocode); tocode_conv = (char *) alloca (tocode_len + 3); strip (tocode_conv, tocode); diff -pNur -x CVS -x libidn glibc-2.5/iconvdata/gconv-modules glibc-2.5-branch/iconvdata/gconv-modules --- glibc-2.5/iconvdata/gconv-modules 2006-05-01 07:19:48.000000000 -0700 +++ glibc-2.5-branch/iconvdata/gconv-modules 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ # GNU libc iconv configuration. -# Copyright (C) 1997-2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1997-2004, 2005, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -1376,7 +1376,7 @@ module INTERNAL INIS-CYRILLIC// INIS-C # from to module cost alias ISO-IR-98// ISO_2033// alias ISO_2033-1983// ISO_2033// -alias E13B/ ISO_2033// +alias E13B// ISO_2033// alias CSISO2033// ISO_2033// module ISO_2033// INTERNAL ISO_2033 1 module INTERNAL ISO_2033// ISO_2033 1 diff -pNur -x CVS -x libidn glibc-2.5/iconvdata/johab.c glibc-2.5-branch/iconvdata/johab.c --- glibc-2.5/iconvdata/johab.c 2002-12-02 14:07:56.000000000 -0800 +++ glibc-2.5-branch/iconvdata/johab.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Mapping tables for JOHAB handling. - Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000-2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jungshik Shin and Ulrich Drepper , 1998. @@ -239,7 +239,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t id if (__builtin_expect (ch2 < 0x31, 0) \ || (__builtin_expect (ch2 > 0x7e, 0) && ch2 < 0x91) \ || __builtin_expect (ch2, 0) == 0xff \ - || (__builtin_expect (ch, 0) == 0xd9 && ch2 > 0xe5) \ + || (__builtin_expect (ch, 0) == 0xd9 && ch2 > 0xe8) \ || (__builtin_expect (ch, 0) == 0xda \ && ch2 > 0xa0 && ch2 < 0xd4) \ || (__builtin_expect (ch, 0) == 0xde && ch2 > 0xf1)) \ @@ -386,7 +386,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t id break; \ } \ if (__builtin_expect (written == __UNKNOWN_10646_CHAR, 0) \ - || (outptr[0] == 0x22 && outptr[1] > 0x65)) \ + || (outptr[0] == 0x22 && outptr[1] > 0x68)) \ { \ UNICODE_TAG_HANDLER (ch, 4); \ STANDARD_TO_LOOP_ERR_HANDLER (4); \ diff -pNur -x CVS -x libidn glibc-2.5/iconvdata/ksc5601.c glibc-2.5-branch/iconvdata/ksc5601.c --- glibc-2.5/iconvdata/ksc5601.c 2001-07-05 21:54:52.000000000 -0700 +++ glibc-2.5-branch/iconvdata/ksc5601.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Conversion tables for KS C 5601-1992 based encoding conversion. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jungshik Shin , 1998. @@ -412,7 +412,8 @@ const uint16_t __ksc5601_sym_to_ucs[] = [0x0098] = 0x2669, [0x0099] = 0x266a, [0x009a] = 0x266c, [0x009b] = 0x327f, [0x009c] = 0x321c, [0x009d] = 0x2116, [0x009e] = 0x33c7, [0x009f] = 0x2122, [0x00a0] = 0x33c2, [0x00a1] = 0x33d8, [0x00a2] = 0x2121, [0x00a3] = 0x20ac, - [0x00a4] = 0x00ae, [0x00bc] = 0xff01, [0x00bd] = 0xff02, [0x00be] = 0xff03, + [0x00a4] = 0x00ae, [0x00a5] = 0x327e, + [0x00bc] = 0xff01, [0x00bd] = 0xff02, [0x00be] = 0xff03, [0x00bf] = 0xff04, [0x00c0] = 0xff05, [0x00c1] = 0xff06, [0x00c2] = 0xff07, [0x00c3] = 0xff08, [0x00c4] = 0xff09, [0x00c5] = 0xff0a, [0x00c6] = 0xff0b, [0x00c7] = 0xff0c, [0x00c8] = 0xff0d, [0x00c9] = 0xff0e, [0x00ca] = 0xff0f, @@ -917,6 +918,7 @@ const struct map __ksc5601_sym_from_ucs[ {0x3273, "\x28\x44"}, {0x3274, "\x28\x45"}, {0x3275, "\x28\x46"}, {0x3276, "\x28\x47"}, {0x3277, "\x28\x48"}, {0x3278, "\x28\x49"}, {0x3279, "\x28\x4a"}, {0x327a, "\x28\x4b"}, {0x327b, "\x28\x4c"}, + {0x327e, "\x22\x68"}, {0x327f, "\x22\x5e"}, {0x3380, "\x27\x49"}, {0x3381, "\x27\x4a"}, {0x3382, "\x27\x4b"}, {0x3383, "\x27\x4c"}, {0x3384, "\x27\x4d"}, {0x3388, "\x27\x3a"}, {0x3389, "\x27\x3b"}, {0x338a, "\x27\x5c"}, diff -pNur -x CVS -x libidn glibc-2.5/iconvdata/ksc5601.h glibc-2.5-branch/iconvdata/ksc5601.h --- glibc-2.5/iconvdata/ksc5601.h 2003-06-11 14:40:42.000000000 -0700 +++ glibc-2.5-branch/iconvdata/ksc5601.h 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Access functions for KS C 5601-1992 based encoding conversion. - Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ #define KSC5601_HANGUL 2350 #define KSC5601_HANJA 4888 -#define KSC5601_SYMBOL 988 +#define KSC5601_SYMBOL 989 #include #include diff -pNur -x CVS -x libidn glibc-2.5/iconvdata/uhc.c glibc-2.5-branch/iconvdata/uhc.c --- glibc-2.5/iconvdata/uhc.c 2002-12-02 14:07:56.000000000 -0800 +++ glibc-2.5-branch/iconvdata/uhc.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,5 +1,5 @@ /* Mapping tables for UHC handling. - Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000-2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jungshik Shin , 1998. @@ -3135,7 +3135,8 @@ static const char uhc_hangul_from_ucs[11 else \ { \ ch = ksc5601_to_ucs4 (&inptr, 2, 0x80); \ - if (__builtin_expect (ch == __UNKNOWN_10646_CHAR, 0)) \ + if (__builtin_expect (ch == __UNKNOWN_10646_CHAR, 0) \ + || __builtin_expect (ch == 0x327e, 0)) \ { \ /* Illegal. */ \ STANDARD_FROM_LOOP_ERR_HANDLER (2); \ @@ -3207,16 +3208,17 @@ static const char uhc_hangul_from_ucs[11 { \ size_t written = ucs4_to_ksc5601_sym (ch, outptr, outend - outptr); \ \ + if (__builtin_expect (ch == 0x327e, 0) \ + || __builtin_expect (written == __UNKNOWN_10646_CHAR, 0)) \ + { \ + UNICODE_TAG_HANDLER (ch, 4); \ + STANDARD_TO_LOOP_ERR_HANDLER (4); \ + } \ if (__builtin_expect (written == 0, 0)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ } \ - if (__builtin_expect (written == __UNKNOWN_10646_CHAR, 0)) \ - { \ - UNICODE_TAG_HANDLER (ch, 4); \ - STANDARD_TO_LOOP_ERR_HANDLER (4); \ - } \ \ *outptr++ |= 0x80; \ *outptr++ |= 0x80; \ diff -pNur -x CVS -x libidn glibc-2.5/include/atomic.h glibc-2.5-branch/include/atomic.h --- glibc-2.5/include/atomic.h 2006-02-17 10:50:09.000000000 -0800 +++ glibc-2.5-branch/include/atomic.h 2007-01-12 09:58:08.000000000 -0800 @@ -324,6 +324,12 @@ #endif +#ifndef atomic_forced_read +# define atomic_forced_read(x) \ + ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; }) +#endif + + #ifndef atomic_delay # define atomic_delay() do { /* nothing */ } while (0) #endif diff -pNur -x CVS -x libidn glibc-2.5/include/features.h glibc-2.5-branch/include/features.h --- glibc-2.5/include/features.h 2006-04-25 13:34:32.000000000 -0700 +++ glibc-2.5-branch/include/features.h 2007-01-12 09:16:43.000000000 -0800 @@ -49,7 +49,7 @@ The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__. If none of these are defined, the default is to have _SVID_SOURCE, _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to - 199506L. If more than one of these are defined, they accumulate. + 200112L. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. @@ -304,7 +304,7 @@ /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 -#define __GLIBC_MINOR__ 4 +#define __GLIBC_MINOR__ 5 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) diff -pNur -x CVS -x libidn glibc-2.5/include/link.h glibc-2.5-branch/include/link.h --- glibc-2.5/include/link.h 2006-09-20 13:28:55.000000000 -0700 +++ glibc-2.5-branch/include/link.h 2007-07-12 09:58:02.000000000 -0700 @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-2002,2003,2004,2005,2006 Free Software Foundation, Inc. + Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -42,7 +42,8 @@ extern unsigned int la_objopen (struct l #include #include #include -#include /* Defines USE_TLS. */ +#include +#include /* Some internal data structures of the dynamic linker used in the @@ -181,6 +182,9 @@ struct link_map is interested in the PLT interception.*/ unsigned int l_removed:1; /* Nozero if the object cannot be used anymore since it is removed. */ + unsigned int l_contiguous:1; /* Nonzero if inter-segment holes are + mprotected or if no holes are present at + all. */ /* Array with version names. */ unsigned int l_nversions; diff -pNur -x CVS -x libidn glibc-2.5/include/rpcsvc/nislib.h glibc-2.5-branch/include/rpcsvc/nislib.h --- glibc-2.5/include/rpcsvc/nislib.h 2004-10-24 13:25:25.000000000 -0700 +++ glibc-2.5-branch/include/rpcsvc/nislib.h 2007-07-12 08:09:19.000000000 -0700 @@ -42,4 +42,6 @@ libnsl_hidden_proto (__nis_default_group libnsl_hidden_proto (__nis_default_access) libnsl_hidden_proto (nis_clone_object) +extern const_nis_name __nis_domain_of (const_nis_name) __THROW; + #endif diff -pNur -x CVS -x libidn glibc-2.5/include/sys/cdefs.h glibc-2.5-branch/include/sys/cdefs.h --- glibc-2.5/include/sys/cdefs.h 2004-10-17 21:17:15.000000000 -0700 +++ glibc-2.5-branch/include/sys/cdefs.h 2007-07-12 08:22:47.000000000 -0700 @@ -2,6 +2,12 @@ #include +/* The compiler will optimize based on the knowledge the parameter is + not NULL. This will omit tests. A robust implementation cannot allow + this so when compiling glibc itself we ignore this attribute. */ +#undef __nonnull +#define __nonnull(params) + extern void __chk_fail (void) __attribute__ ((__noreturn__)); libc_hidden_proto (__chk_fail) rtld_hidden_proto (__chk_fail) diff -pNur -x CVS -x libidn glibc-2.5/include/sys/mman.h glibc-2.5-branch/include/sys/mman.h --- glibc-2.5/include/sys/mman.h 2005-10-14 14:06:10.000000000 -0700 +++ glibc-2.5-branch/include/sys/mman.h 2007-07-12 08:10:31.000000000 -0700 @@ -12,4 +12,7 @@ extern int __mprotect (void *__addr, siz /* This one is Linux specific. */ extern void *__mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...); + +libc_hidden_proto (madvise); + #endif diff -pNur -x CVS -x libidn glibc-2.5/inet/inet6_opt.c glibc-2.5-branch/inet/inet6_opt.c --- glibc-2.5/inet/inet6_opt.c 2006-05-24 21:38:02.000000000 -0700 +++ glibc-2.5-branch/inet/inet6_opt.c 2007-07-12 09:58:02.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2006. @@ -51,7 +51,7 @@ add_padding (uint8_t *extbuf, int offset { if (npad == 1) extbuf[offset] = IP6OPT_PAD1; - else + else if (npad > 0) { struct ip6_opt *pad_opt = (struct ip6_opt *) (extbuf + offset); @@ -102,21 +102,17 @@ inet6_opt_append (void *extbuf, socklen_ int data_offset = offset + sizeof (struct ip6_opt); int npad = (align - data_offset % align) & (align - 1); - /* Now we can check whether the buffer is large enough. */ - if (data_offset + npad + len > extlen) - return -1; - - if (npad != 0) + if (extbuf != NULL) { - if (extbuf != NULL) - add_padding (extbuf, offset, npad); + /* Now we can check whether the buffer is large enough. */ + if (data_offset + npad + len > extlen) + return -1; + + add_padding (extbuf, offset, npad); offset += npad; - } - /* Now prepare the option itself. */ - if (extbuf != NULL) - { + /* Now prepare the option itself. */ struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset); opt->ip6o_type = type; @@ -124,6 +120,8 @@ inet6_opt_append (void *extbuf, socklen_ *databufp = opt + 1; } + else + offset += npad; return offset + sizeof (struct ip6_opt) + len; } @@ -145,12 +143,14 @@ inet6_opt_finish (void *extbuf, socklen_ /* Required padding at the end. */ int npad = (8 - (offset & 7)) & 7; - /* Make sure the buffer is large enough. */ - if (offset + npad > extlen) - return -1; - if (extbuf != NULL) - add_padding (extbuf, offset, npad); + { + /* Make sure the buffer is large enough. */ + if (offset + npad > extlen) + return -1; + + add_padding (extbuf, offset, npad); + } return offset + npad; } diff -pNur -x CVS -x libidn glibc-2.5/inet/Makefile glibc-2.5-branch/inet/Makefile --- glibc-2.5/inet/Makefile 2006-05-24 21:38:29.000000000 -0700 +++ glibc-2.5-branch/inet/Makefile 2007-07-12 09:58:02.000000000 -0700 @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ routines := htonl htons \ aux := check_pf ifreq tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \ - tst-gethnm test-ifaddrs bug-if1 + tst-gethnm test-ifaddrs bug-if1 test-inet6_opt include ../Rules diff -pNur -x CVS -x libidn glibc-2.5/inet/test-inet6_opt.c glibc-2.5-branch/inet/test-inet6_opt.c --- glibc-2.5/inet/test-inet6_opt.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/inet/test-inet6_opt.c 2007-07-12 08:00:49.000000000 -0700 @@ -0,0 +1,207 @@ +#include +#include +#include +#include + +#define OPT_X 42 +#define OPT_Y 43 +#define OPT_Z 44 + +static void * +encode_inet6_opt (socklen_t *elp) +{ + void *eb = NULL; + socklen_t el; + int cl; + void *db; + int offset; + uint8_t val1; + uint16_t val2; + uint32_t val4; + uint64_t val8; + + *elp = 0; +#define CHECK() \ + if (cl == -1) \ + { \ + printf ("cl == -1 on line %d\n", __LINE__); \ + free (eb); \ + return NULL; \ + } + + /* Estimate the length */ + cl = inet6_opt_init (NULL, 0); + CHECK (); + cl = inet6_opt_append (NULL, 0, cl, OPT_X, 12, 8, NULL); + CHECK (); + cl = inet6_opt_append (NULL, 0, cl, OPT_Y, 7, 4, NULL); + CHECK (); + cl = inet6_opt_append (NULL, 0, cl, OPT_Z, 7, 1, NULL); + CHECK (); + cl = inet6_opt_finish (NULL, 0, cl); + CHECK (); + el = cl; + + eb = malloc (el + 8); + if (eb == NULL) + { + puts ("malloc failed"); + return NULL; + } + /* Canary. */ + memcpy (eb + el, "deadbeef", 8); + + cl = inet6_opt_init (eb, el); + CHECK (); + + cl = inet6_opt_append (eb, el, cl, OPT_X, 12, 8, &db); + CHECK (); + val4 = 0x12345678; + offset = inet6_opt_set_val (db, 0, &val4, sizeof (val4)); + val8 = 0x0102030405060708LL; + inet6_opt_set_val (db, offset, &val8, sizeof (val8)); + + cl = inet6_opt_append (eb, el, cl, OPT_Y, 7, 4, &db); + CHECK (); + val1 = 0x01; + offset = inet6_opt_set_val (db, 0, &val1, sizeof (val1)); + val2 = 0x1331; + offset = inet6_opt_set_val (db, offset, &val2, sizeof (val2)); + val4 = 0x01020304; + inet6_opt_set_val (db, offset, &val4, sizeof (val4)); + + cl = inet6_opt_append (eb, el, cl, OPT_Z, 7, 1, &db); + CHECK (); + inet6_opt_set_val (db, 0, (void *) "abcdefg", 7); + + cl = inet6_opt_finish (eb, el, cl); + CHECK (); + + if (memcmp (eb + el, "deadbeef", 8) != 0) + { + puts ("Canary corrupted"); + free (eb); + return NULL; + } + *elp = el; + return eb; +} + +int +decode_inet6_opt (void *eb, socklen_t el) +{ + int ret = 0; + int seq = 0; + int cl = 0; + int offset; + uint8_t type; + socklen_t len; + uint8_t val1; + uint16_t val2; + uint32_t val4; + uint64_t val8; + void *db; + char buf[8]; + + while ((cl = inet6_opt_next (eb, el, cl, &type, &len, &db)) != -1) + switch (type) + { + case OPT_X: + if (seq++ != 0) + { + puts ("OPT_X is not first"); + ret = 1; + } + if (len != 12) + { + printf ("OPT_X's length %d != 12\n", len); + ret = 1; + } + offset = inet6_opt_get_val (db, 0, &val4, sizeof (val4)); + if (val4 != 0x12345678) + { + printf ("OPT_X's val4 %x != 0x12345678\n", val4); + ret = 1; + } + offset = inet6_opt_get_val (db, offset, &val8, sizeof (val8)); + if (offset != len || val8 != 0x0102030405060708LL) + { + printf ("OPT_X's val8 %llx != 0x0102030405060708\n", + (long long) val8); + ret = 1; + } + break; + case OPT_Y: + if (seq++ != 1) + { + puts ("OPT_Y is not second"); + ret = 1; + } + if (len != 7) + { + printf ("OPT_Y's length %d != 7\n", len); + ret = 1; + } + offset = inet6_opt_get_val (db, 0, &val1, sizeof (val1)); + if (val1 != 0x01) + { + printf ("OPT_Y's val1 %x != 0x01\n", val1); + ret = 1; + } + offset = inet6_opt_get_val (db, offset, &val2, sizeof (val2)); + if (val2 != 0x1331) + { + printf ("OPT_Y's val2 %x != 0x1331\n", val2); + ret = 1; + } + offset = inet6_opt_get_val (db, offset, &val4, sizeof (val4)); + if (offset != len || val4 != 0x01020304) + { + printf ("OPT_Y's val4 %x != 0x01020304\n", val4); + ret = 1; + } + break; + case OPT_Z: + if (seq++ != 2) + { + puts ("OPT_Z is not third"); + ret = 1; + } + if (len != 7) + { + printf ("OPT_Z's length %d != 7\n", len); + ret = 1; + } + offset = inet6_opt_get_val (db, 0, buf, 7); + if (offset != len || memcmp (buf, "abcdefg", 7) != 0) + { + buf[7] = '\0'; + printf ("OPT_Z's buf \"%s\" != \"abcdefg\"\n", buf); + ret = 1; + } + break; + default: + printf ("Unknown option %d\n", type); + ret = 1; + break; + } + if (seq != 3) + { + puts ("Didn't see all of OPT_X, OPT_Y and OPT_Z"); + ret = 1; + } + return ret; +} + +int +main (void) +{ + void *eb; + socklen_t el; + eb = encode_inet6_opt (&el); + if (eb == NULL) + return 1; + if (decode_inet6_opt (eb, el)) + return 1; + return 0; +} diff -pNur -x CVS -x libidn glibc-2.5/io/bug-ftw5.c glibc-2.5-branch/io/bug-ftw5.c --- glibc-2.5/io/bug-ftw5.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/io/bug-ftw5.c 2007-07-12 07:57:39.000000000 -0700 @@ -0,0 +1,25 @@ +#include +#include +#include + +static int +fn (const char *file, const struct stat *sb, int flag, struct FTW *s) +{ + puts (file); + return FTW_STOP; +} + +static int +do_test (void) +{ + if (nftw ("/", fn, 0, FTW_CHDIR | FTW_ACTIONRETVAL) < 0) + { + printf ("nftw / FTW_CHDIR: %m\n"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/io/fts.c glibc-2.5-branch/io/fts.c --- glibc-2.5/io/fts.c 2006-04-08 12:33:17.000000000 -0700 +++ glibc-2.5-branch/io/fts.c 2007-07-12 07:31:49.000000000 -0700 @@ -251,8 +251,7 @@ fts_close(sp) /* Free up child linked list, sort array, path buffer. */ if (sp->fts_child) fts_lfree(sp->fts_child); - if (sp->fts_array) - free(sp->fts_array); + free(sp->fts_array); free(sp->fts_path); /* Return to original directory, save errno if necessary. */ @@ -377,12 +376,14 @@ fts_read(sp) } p = sp->fts_child; sp->fts_child = NULL; + sp->fts_cur = p; goto name; } /* Move to the next node on this level. */ next: tmp = p; if ((p = p->fts_link) != NULL) { + sp->fts_cur = p; free(tmp); /* @@ -395,7 +396,7 @@ next: tmp = p; return (NULL); } fts_load(sp, p); - return (sp->fts_cur = p); + return p; } /* @@ -421,11 +422,12 @@ next: tmp = p; name: t = sp->fts_path + NAPPEND(p->fts_parent); *t++ = '/'; memmove(t, p->fts_name, p->fts_namelen + 1); - return (sp->fts_cur = p); + return p; } /* Move up to the parent node. */ p = tmp->fts_parent; + sp->fts_cur = p; free(tmp); if (p->fts_level == FTS_ROOTPARENTLEVEL) { @@ -466,7 +468,7 @@ name: t = sp->fts_path + NAPPEND(p->fts return (NULL); } p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; - return (sp->fts_cur = p); + return p; } /* @@ -705,8 +707,7 @@ fts_build(sp, type) * structures already allocated. */ mem1: saved_errno = errno; - if (p) - free(p); + free(p); fts_lfree(head); (void)__closedir(dirp); cur->fts_info = FTS_ERR; @@ -1043,10 +1044,7 @@ fts_palloc(sp, more) * We limit fts_pathlen to USHRT_MAX to be safe in both cases. */ if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { - if (sp->fts_path) { - free(sp->fts_path); - sp->fts_path = NULL; - } + free(sp->fts_path); sp->fts_path = NULL; __set_errno (ENAMETOOLONG); return (1); diff -pNur -x CVS -x libidn glibc-2.5/io/ftw.c glibc-2.5-branch/io/ftw.c --- glibc-2.5/io/ftw.c 2006-05-09 23:35:59.000000000 -0700 +++ glibc-2.5-branch/io/ftw.c 2007-07-12 09:58:03.000000000 -0700 @@ -1,5 +1,5 @@ /* File tree walker functions. - Copyright (C) 1996-2003, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -348,8 +348,17 @@ open_dir_stream (int *dfdp, struct ftw_d } else { - const char *name = ((data->flags & FTW_CHDIR) - ? data->dirbuf + data->ftw.base: data->dirbuf); + const char *name; + + if (data->flags & FTW_CHDIR) + { + name = data->dirbuf + data->ftw.base; + if (name[0] == '\0') + name = "."; + } + else + name = data->dirbuf; + dirp->stream = __opendir (name); } @@ -721,9 +730,16 @@ ftw_startup (const char *dir, int is_nft /* Get stat info for start directory. */ if (result == 0) { - const char *name = ((data.flags & FTW_CHDIR) - ? data.dirbuf + data.ftw.base - : data.dirbuf); + const char *name; + + if (data.flags & FTW_CHDIR) + { + name = data.dirbuf + data.ftw.base; + if (name[0] == '\0') + name = "."; + } + else + name = data.dirbuf; if (((flags & FTW_PHYS) ? LXSTAT (_STAT_VER, name, &st) diff -pNur -x CVS -x libidn glibc-2.5/io/Makefile glibc-2.5-branch/io/Makefile --- glibc-2.5/io/Makefile 2006-09-17 00:25:55.000000000 -0700 +++ glibc-2.5-branch/io/Makefile 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,4 @@ -# Copyright (C) 1992-2002,2003,2005,2006 Free Software Foundation, Inc. +# Copyright (C) 1992-2002,2003,2005,2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -66,7 +66,7 @@ tests := test-utime test-stat test-stat tst-openat tst-unlinkat tst-fstatat tst-futimesat \ tst-renameat tst-fchownat tst-fchmodat tst-faccessat \ tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \ - tst-mknodat tst-mkfifoat + tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 distribute := ftwtest-sh diff -pNur -x CVS -x libidn glibc-2.5/io/tst-ttyname_r.c glibc-2.5-branch/io/tst-ttyname_r.c --- glibc-2.5/io/tst-ttyname_r.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/io/tst-ttyname_r.c 2007-01-12 09:27:52.000000000 -0800 @@ -0,0 +1,42 @@ +#include +#include +#include +#include +#include + +static void do_prepare (void); +#define PREPARE(argc, argv) do_prepare () +static int do_test (void); +#define TEST_FUNCTION do_test () +#include + +static int temp_fd; + +static void +do_prepare (void) +{ + char *temp_file; + temp_fd = create_temp_file ("tst-ttyname_r.", &temp_file); + if (temp_fd == -1) + error (1, errno, "cannot create temporary file"); +} + +static int +do_test (void) +{ + int ret = 0; + char buf[sysconf (_SC_TTY_NAME_MAX) + 1]; + int res = ttyname_r (-1, buf, sizeof (buf)); + if (res != EBADF) + { + printf ("1st ttyname_r returned with res %d\n", res); + ret++; + } + res = ttyname_r (temp_fd, buf, sizeof (buf)); + if (res != ENOTTY) + { + printf ("2nd ttyname_r returned with res %d\n", res); + ret++; + } + return ret; +} diff -pNur -x CVS -x libidn glibc-2.5/libio/bits/stdio.h glibc-2.5-branch/libio/bits/stdio.h --- glibc-2.5/libio/bits/stdio.h 2004-09-07 15:23:44.000000000 -0700 +++ glibc-2.5-branch/libio/bits/stdio.h 2007-07-12 09:58:03.000000000 -0700 @@ -1,5 +1,5 @@ /* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 2001, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2001, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -44,6 +44,16 @@ getchar (void) } +# ifdef __USE_MISC +/* Faster version when locking is not necessary. */ +__STDIO_INLINE int +fgetc_unlocked (FILE *__fp) +{ + return _IO_getc_unlocked (__fp); +} +# endif /* misc */ + + # if defined __USE_POSIX || defined __USE_MISC /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int diff -pNur -x CVS -x libidn glibc-2.5/libio/bug-wmemstream1.c glibc-2.5-branch/libio/bug-wmemstream1.c --- glibc-2.5/libio/bug-wmemstream1.c 2006-08-14 15:11:34.000000000 -0700 +++ glibc-2.5-branch/libio/bug-wmemstream1.c 2006-09-29 17:06:33.000000000 -0700 @@ -1,5 +1,6 @@ #include #include +#include static int diff -pNur -x CVS -x libidn glibc-2.5/libio/fileops.c glibc-2.5-branch/libio/fileops.c --- glibc-2.5/libio/fileops.c 2006-01-18 16:38:35.000000000 -0800 +++ glibc-2.5-branch/libio/fileops.c 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1995, 1997-2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -174,14 +175,8 @@ _IO_new_file_close_it (fp) close_status = _IO_SYSCLOSE (fp); /* Free buffer. */ - if (fp->_mode <= 0) - { - INTUSE(_IO_setb) (fp, NULL, NULL, 0); - _IO_setg (fp, NULL, NULL, NULL); - _IO_setp (fp, NULL, NULL); - } #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T - else + if (fp->_mode > 0) { if (_IO_have_wbackup (fp)) INTUSE(_IO_free_wbackup_area) (fp); @@ -190,6 +185,9 @@ _IO_new_file_close_it (fp) _IO_wsetp (fp, NULL, NULL); } #endif + INTUSE(_IO_setb) (fp, NULL, NULL, 0); + _IO_setg (fp, NULL, NULL, NULL); + _IO_setp (fp, NULL, NULL); INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS; @@ -475,7 +473,7 @@ _IO_file_setbuf_mmap (fp, p, len) return result; } -static _IO_size_t new_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; +static _IO_size_t new_do_write (_IO_FILE *, const char *, _IO_size_t); /* Write TO_DO bytes from DATA to FP. Then mark FP as having empty buffers. */ @@ -1471,8 +1469,7 @@ _IO_file_xsgetn (fp, data, n) } INTDEF(_IO_file_xsgetn) -static _IO_size_t _IO_file_xsgetn_mmap (_IO_FILE *, void *, _IO_size_t) - __THROW; +static _IO_size_t _IO_file_xsgetn_mmap (_IO_FILE *, void *, _IO_size_t); static _IO_size_t _IO_file_xsgetn_mmap (fp, data, n) _IO_FILE *fp; @@ -1531,8 +1528,7 @@ _IO_file_xsgetn_mmap (fp, data, n) return s - (char *) data; } -static _IO_size_t _IO_file_xsgetn_maybe_mmap (_IO_FILE *, void *, _IO_size_t) - __THROW; +static _IO_size_t _IO_file_xsgetn_maybe_mmap (_IO_FILE *, void *, _IO_size_t); static _IO_size_t _IO_file_xsgetn_maybe_mmap (fp, data, n) _IO_FILE *fp; diff -pNur -x CVS -x libidn glibc-2.5/libio/genops.c glibc-2.5-branch/libio/genops.c --- glibc-2.5/libio/genops.c 2006-02-28 21:32:48.000000000 -0800 +++ glibc-2.5-branch/libio/genops.c 2007-01-12 09:25:38.000000000 -0800 @@ -367,7 +367,7 @@ __uflow (fp) #endif if (fp->_mode == 0) - _IO_fwide (fp, -11); + _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF) return EOF; diff -pNur -x CVS -x libidn glibc-2.5/libio/libio.h glibc-2.5-branch/libio/libio.h --- glibc-2.5/libio/libio.h 2006-01-14 04:09:46.000000000 -0800 +++ glibc-2.5-branch/libio/libio.h 2007-07-12 08:07:31.000000000 -0700 @@ -142,6 +142,7 @@ #ifdef _LIBC # define _IO_FLAGS2_FORTIFY 4 #endif +#define _IO_FLAGS2_USER_WBUF 8 /* These are "formatting flags" matching the iostream fmtflags enum values. */ #define _IO_SKIPWS 01 @@ -409,12 +410,12 @@ extern void _IO_cookie_init (struct _IO_ extern "C" { #endif -extern int __underflow (_IO_FILE *) __THROW; -extern int __uflow (_IO_FILE *) __THROW; -extern int __overflow (_IO_FILE *, int) __THROW; -extern _IO_wint_t __wunderflow (_IO_FILE *) __THROW; -extern _IO_wint_t __wuflow (_IO_FILE *) __THROW; -extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t) __THROW; +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern _IO_wint_t __wunderflow (_IO_FILE *); +extern _IO_wint_t __wuflow (_IO_FILE *); +extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t); #if __GNUC__ >= 3 # define _IO_BE(expr, res) __builtin_expect ((expr), res) @@ -447,12 +448,12 @@ extern _IO_wint_t __woverflow (_IO_FILE #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) -extern int _IO_getc (_IO_FILE *__fp) __THROW; -extern int _IO_putc (int __c, _IO_FILE *__fp) __THROW; +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) __THROW; extern int _IO_ferror (_IO_FILE *__fp) __THROW; -extern int _IO_peekc_locked (_IO_FILE *__fp) __THROW; +extern int _IO_peekc_locked (_IO_FILE *__fp); /* This one is for Emacs. */ #define _IO_PENDING_OUTPUT_COUNT(_fp) \ @@ -481,17 +482,17 @@ extern int _IO_vfscanf (_IO_FILE * __res _IO_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, _IO_va_list); -extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t) __THROW; -extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t) __THROW; +extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t); +extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t); -extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW; -extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int) __THROW; +extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int); +extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) __THROW; #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T -extern _IO_wint_t _IO_getwc (_IO_FILE *__fp) __THROW; -extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __THROW; +extern _IO_wint_t _IO_getwc (_IO_FILE *__fp); +extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp); extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW; # if __GNUC__ >= 2 /* While compiling glibc we have to handle compatibility with very old @@ -530,7 +531,7 @@ extern int _IO_vfwscanf (_IO_FILE * __re _IO_va_list, int *__restrict); extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict, _IO_va_list); -extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW; +extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t); extern void _IO_free_wbackup_area (_IO_FILE *) __THROW; #endif diff -pNur -x CVS -x libidn glibc-2.5/libio/libioP.h glibc-2.5-branch/libio/libioP.h --- glibc-2.5/libio/libioP.h 2006-01-14 04:09:46.000000000 -0800 +++ glibc-2.5-branch/libio/libioP.h 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2003,2004,2005,2006 +/* Copyright (C) 1993, 1997-2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -380,7 +380,7 @@ typedef struct _IO_FILE *_IO_ITER; extern void _IO_switch_to_main_get_area (_IO_FILE *) __THROW; extern void _IO_switch_to_backup_area (_IO_FILE *) __THROW; -extern int _IO_switch_to_get_mode (_IO_FILE *) __THROW; +extern int _IO_switch_to_get_mode (_IO_FILE *); extern void _IO_init (_IO_FILE *, int) __THROW; extern int _IO_sputbackc (_IO_FILE *, int) __THROW; extern int _IO_sungetc (_IO_FILE *) __THROW; @@ -394,7 +394,7 @@ extern unsigned _IO_adjust_column (unsig extern void _IO_switch_to_main_wget_area (_IO_FILE *) __THROW; extern void _IO_switch_to_wbackup_area (_IO_FILE *) __THROW; -extern int _IO_switch_to_wget_mode (_IO_FILE *) __THROW; +extern int _IO_switch_to_wget_mode (_IO_FILE *); extern void _IO_wsetb (_IO_FILE *, wchar_t *, wchar_t *, int) __THROW; extern wint_t _IO_sputbackwc (_IO_FILE *, wint_t) __THROW; extern wint_t _IO_sungetwc (_IO_FILE *) __THROW; @@ -404,8 +404,8 @@ extern unsigned _IO_adjust_wcolumn (unsi /* Marker-related function. */ -extern void _IO_init_marker (struct _IO_marker *, _IO_FILE *) __THROW; -extern void _IO_init_wmarker (struct _IO_marker *, _IO_FILE *) __THROW; +extern void _IO_init_marker (struct _IO_marker *, _IO_FILE *); +extern void _IO_init_wmarker (struct _IO_marker *, _IO_FILE *); extern void _IO_remove_marker (struct _IO_marker *) __THROW; extern int _IO_marker_difference (struct _IO_marker *, struct _IO_marker *) __THROW; @@ -434,22 +434,22 @@ libc_hidden_proto (_IO_list_resetlock) /* Default jumptable functions. */ extern int _IO_default_underflow (_IO_FILE *) __THROW; -extern int _IO_default_uflow (_IO_FILE *) __THROW; -extern wint_t _IO_wdefault_uflow (_IO_FILE *) __THROW; +extern int _IO_default_uflow (_IO_FILE *); +extern wint_t _IO_wdefault_uflow (_IO_FILE *); extern int _IO_default_doallocate (_IO_FILE *) __THROW; extern int _IO_wdefault_doallocate (_IO_FILE *) __THROW; extern void _IO_default_finish (_IO_FILE *, int) __THROW; extern void _IO_wdefault_finish (_IO_FILE *, int) __THROW; extern int _IO_default_pbackfail (_IO_FILE *, int) __THROW; extern wint_t _IO_wdefault_pbackfail (_IO_FILE *, wint_t) __THROW; -extern _IO_FILE* _IO_default_setbuf (_IO_FILE *, char *, _IO_ssize_t) __THROW; +extern _IO_FILE* _IO_default_setbuf (_IO_FILE *, char *, _IO_ssize_t); extern _IO_size_t _IO_default_xsputn (_IO_FILE *, const void *, _IO_size_t); extern _IO_size_t _IO_wdefault_xsputn (_IO_FILE *, const void *, _IO_size_t); extern _IO_size_t _IO_default_xsgetn (_IO_FILE *, void *, _IO_size_t); extern _IO_size_t _IO_wdefault_xsgetn (_IO_FILE *, void *, _IO_size_t); extern _IO_off64_t _IO_default_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW; -extern _IO_off64_t _IO_default_seekpos (_IO_FILE *, _IO_off64_t, int) __THROW; +extern _IO_off64_t _IO_default_seekpos (_IO_FILE *, _IO_off64_t, int); extern _IO_ssize_t _IO_default_write (_IO_FILE *, const void *, _IO_ssize_t); extern _IO_ssize_t _IO_default_read (_IO_FILE *, void *, _IO_ssize_t); extern int _IO_default_stat (_IO_FILE *, void *) __THROW; @@ -473,22 +473,22 @@ extern const struct _IO_jump_t _IO_old_p extern const struct _IO_jump_t _IO_str_jumps attribute_hidden; extern const struct _IO_jump_t _IO_wstr_jumps attribute_hidden; extern const struct _IO_codecvt __libio_codecvt attribute_hidden; -extern int _IO_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; -extern int _IO_new_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; -extern int _IO_old_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; -extern int _IO_wdo_write (_IO_FILE *, const wchar_t *, _IO_size_t) __THROW; -extern int _IO_flush_all_lockp (int) __THROW; -extern int _IO_flush_all (void) __THROW; -extern int _IO_cleanup (void) __THROW; -extern void _IO_flush_all_linebuffered (void) __THROW; -extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *) __THROW; -extern int _IO_old_fgetpos (_IO_FILE *, _IO_fpos_t *) __THROW; -extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *) __THROW; -extern int _IO_old_fsetpos (_IO_FILE *, const _IO_fpos_t *) __THROW; -extern int _IO_new_fgetpos64 (_IO_FILE *, _IO_fpos64_t *) __THROW; -extern int _IO_old_fgetpos64 (_IO_FILE *, _IO_fpos64_t *) __THROW; -extern int _IO_new_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *) __THROW; -extern int _IO_old_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *) __THROW; +extern int _IO_do_write (_IO_FILE *, const char *, _IO_size_t); +extern int _IO_new_do_write (_IO_FILE *, const char *, _IO_size_t); +extern int _IO_old_do_write (_IO_FILE *, const char *, _IO_size_t); +extern int _IO_wdo_write (_IO_FILE *, const wchar_t *, _IO_size_t); +extern int _IO_flush_all_lockp (int); +extern int _IO_flush_all (void); +extern int _IO_cleanup (void); +extern void _IO_flush_all_linebuffered (void); +extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *); +extern int _IO_old_fgetpos (_IO_FILE *, _IO_fpos_t *); +extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *); +extern int _IO_old_fsetpos (_IO_FILE *, const _IO_fpos_t *); +extern int _IO_new_fgetpos64 (_IO_FILE *, _IO_fpos64_t *); +extern int _IO_old_fgetpos64 (_IO_FILE *, _IO_fpos64_t *); +extern int _IO_new_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *); +extern int _IO_old_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *); extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW; @@ -534,95 +534,79 @@ extern void _IO_old_init (_IO_FILE *fp, /* Jumptable functions for files. */ extern int _IO_file_doallocate (_IO_FILE *) __THROW; -extern _IO_FILE* _IO_file_setbuf (_IO_FILE *, char *, _IO_ssize_t) __THROW; -extern _IO_off64_t _IO_file_seekoff (_IO_FILE *, _IO_off64_t, int, int) - __THROW; +extern _IO_FILE* _IO_file_setbuf (_IO_FILE *, char *, _IO_ssize_t); +extern _IO_off64_t _IO_file_seekoff (_IO_FILE *, _IO_off64_t, int, int); extern _IO_off64_t _IO_file_seekoff_mmap (_IO_FILE *, _IO_off64_t, int, int) __THROW; -extern _IO_size_t _IO_file_xsputn (_IO_FILE *, const void *, _IO_size_t) - __THROW; -extern _IO_size_t _IO_file_xsgetn (_IO_FILE *, void *, _IO_size_t) __THROW; +extern _IO_size_t _IO_file_xsputn (_IO_FILE *, const void *, _IO_size_t); +extern _IO_size_t _IO_file_xsgetn (_IO_FILE *, void *, _IO_size_t); extern int _IO_file_stat (_IO_FILE *, void *) __THROW; extern int _IO_file_close (_IO_FILE *) __THROW; extern int _IO_file_close_mmap (_IO_FILE *) __THROW; -extern int _IO_file_underflow (_IO_FILE *) __THROW; -extern int _IO_file_underflow_mmap (_IO_FILE *) __THROW; -extern int _IO_file_underflow_maybe_mmap (_IO_FILE *) __THROW; -extern int _IO_file_overflow (_IO_FILE *, int) __THROW; +extern int _IO_file_underflow (_IO_FILE *); +extern int _IO_file_underflow_mmap (_IO_FILE *); +extern int _IO_file_underflow_maybe_mmap (_IO_FILE *); +extern int _IO_file_overflow (_IO_FILE *, int); #define _IO_file_is_open(__fp) ((__fp)->_fileno != -1) extern void _IO_file_init (struct _IO_FILE_plus *) __THROW; -extern _IO_FILE* _IO_file_attach (_IO_FILE *, int) __THROW; -extern _IO_FILE* _IO_file_open (_IO_FILE *, const char *, int, int, int, int) - __THROW; +extern _IO_FILE* _IO_file_attach (_IO_FILE *, int); +extern _IO_FILE* _IO_file_open (_IO_FILE *, const char *, int, int, int, int); libc_hidden_proto (_IO_file_open) -extern _IO_FILE* _IO_file_fopen (_IO_FILE *, const char *, const char *, int) - __THROW; -extern _IO_ssize_t _IO_file_write (_IO_FILE *, const void *, _IO_ssize_t) - __THROW; -extern _IO_ssize_t _IO_file_read (_IO_FILE *, void *, _IO_ssize_t) __THROW; -extern int _IO_file_sync (_IO_FILE *) __THROW; -extern int _IO_file_close_it (_IO_FILE *) __THROW; +extern _IO_FILE* _IO_file_fopen (_IO_FILE *, const char *, const char *, int); +extern _IO_ssize_t _IO_file_write (_IO_FILE *, const void *, _IO_ssize_t); +extern _IO_ssize_t _IO_file_read (_IO_FILE *, void *, _IO_ssize_t); +extern int _IO_file_sync (_IO_FILE *); +extern int _IO_file_close_it (_IO_FILE *); extern _IO_off64_t _IO_file_seek (_IO_FILE *, _IO_off64_t, int) __THROW; -extern void _IO_file_finish (_IO_FILE *, int) __THROW; +extern void _IO_file_finish (_IO_FILE *, int); -extern _IO_FILE* _IO_new_file_attach (_IO_FILE *, int) __THROW; -extern int _IO_new_file_close_it (_IO_FILE *) __THROW; -extern void _IO_new_file_finish (_IO_FILE *, int) __THROW; +extern _IO_FILE* _IO_new_file_attach (_IO_FILE *, int); +extern int _IO_new_file_close_it (_IO_FILE *); +extern void _IO_new_file_finish (_IO_FILE *, int); extern _IO_FILE* _IO_new_file_fopen (_IO_FILE *, const char *, const char *, - int) __THROW; + int); extern void _IO_no_init (_IO_FILE *, int, int, struct _IO_wide_data *, const struct _IO_jump_t *) __THROW; extern void _IO_new_file_init (struct _IO_FILE_plus *) __THROW; -extern _IO_FILE* _IO_new_file_setbuf (_IO_FILE *, char *, _IO_ssize_t) __THROW; -extern _IO_FILE* _IO_file_setbuf_mmap (_IO_FILE *, char *, _IO_ssize_t) - __THROW; -extern int _IO_new_file_sync (_IO_FILE *) __THROW; -extern int _IO_new_file_underflow (_IO_FILE *) __THROW; -extern int _IO_new_file_overflow (_IO_FILE *, int) __THROW; -extern _IO_off64_t _IO_new_file_seekoff (_IO_FILE *, _IO_off64_t, int, int) - __THROW; -extern _IO_ssize_t _IO_new_file_write (_IO_FILE *, const void *, _IO_ssize_t) - __THROW; -extern _IO_size_t _IO_new_file_xsputn (_IO_FILE *, const void *, _IO_size_t) - __THROW; - -extern _IO_FILE* _IO_old_file_setbuf (_IO_FILE *, char *, _IO_ssize_t) __THROW; -extern _IO_off64_t _IO_old_file_seekoff (_IO_FILE *, _IO_off64_t, int, int) - __THROW; -extern _IO_size_t _IO_old_file_xsputn (_IO_FILE *, const void *, _IO_size_t) - __THROW; -extern int _IO_old_file_underflow (_IO_FILE *) __THROW; -extern int _IO_old_file_overflow (_IO_FILE *, int) __THROW; +extern _IO_FILE* _IO_new_file_setbuf (_IO_FILE *, char *, _IO_ssize_t); +extern _IO_FILE* _IO_file_setbuf_mmap (_IO_FILE *, char *, _IO_ssize_t); +extern int _IO_new_file_sync (_IO_FILE *); +extern int _IO_new_file_underflow (_IO_FILE *); +extern int _IO_new_file_overflow (_IO_FILE *, int); +extern _IO_off64_t _IO_new_file_seekoff (_IO_FILE *, _IO_off64_t, int, int); +extern _IO_ssize_t _IO_new_file_write (_IO_FILE *, const void *, _IO_ssize_t); +extern _IO_size_t _IO_new_file_xsputn (_IO_FILE *, const void *, _IO_size_t); + +extern _IO_FILE* _IO_old_file_setbuf (_IO_FILE *, char *, _IO_ssize_t); +extern _IO_off64_t _IO_old_file_seekoff (_IO_FILE *, _IO_off64_t, int, int); +extern _IO_size_t _IO_old_file_xsputn (_IO_FILE *, const void *, _IO_size_t); +extern int _IO_old_file_underflow (_IO_FILE *); +extern int _IO_old_file_overflow (_IO_FILE *, int); extern void _IO_old_file_init (struct _IO_FILE_plus *) __THROW; -extern _IO_FILE* _IO_old_file_attach (_IO_FILE *, int) __THROW; -extern _IO_FILE* _IO_old_file_fopen (_IO_FILE *, const char *, const char *) - __THROW; -extern _IO_ssize_t _IO_old_file_write (_IO_FILE *, const void *, _IO_ssize_t) - __THROW; -extern int _IO_old_file_sync (_IO_FILE *) __THROW; -extern int _IO_old_file_close_it (_IO_FILE *) __THROW; -extern void _IO_old_file_finish (_IO_FILE *, int) __THROW; +extern _IO_FILE* _IO_old_file_attach (_IO_FILE *, int); +extern _IO_FILE* _IO_old_file_fopen (_IO_FILE *, const char *, const char *); +extern _IO_ssize_t _IO_old_file_write (_IO_FILE *, const void *, _IO_ssize_t); +extern int _IO_old_file_sync (_IO_FILE *); +extern int _IO_old_file_close_it (_IO_FILE *); +extern void _IO_old_file_finish (_IO_FILE *, int); extern int _IO_wfile_doallocate (_IO_FILE *) __THROW; -extern _IO_size_t _IO_wfile_xsputn (_IO_FILE *, const void *, _IO_size_t) - __THROW; -extern _IO_FILE* _IO_wfile_setbuf (_IO_FILE *, wchar_t *, _IO_ssize_t) __THROW; -extern wint_t _IO_wfile_sync (_IO_FILE *) __THROW; -extern wint_t _IO_wfile_underflow (_IO_FILE *) __THROW; -extern wint_t _IO_wfile_overflow (_IO_FILE *, wint_t) __THROW; -extern _IO_off64_t _IO_wfile_seekoff (_IO_FILE *, _IO_off64_t, int, int) - __THROW; +extern _IO_size_t _IO_wfile_xsputn (_IO_FILE *, const void *, _IO_size_t); +extern _IO_FILE* _IO_wfile_setbuf (_IO_FILE *, wchar_t *, _IO_ssize_t); +extern wint_t _IO_wfile_sync (_IO_FILE *); +extern wint_t _IO_wfile_underflow (_IO_FILE *); +extern wint_t _IO_wfile_overflow (_IO_FILE *, wint_t); +extern _IO_off64_t _IO_wfile_seekoff (_IO_FILE *, _IO_off64_t, int, int); /* Jumptable functions for proc_files. */ extern _IO_FILE* _IO_proc_open (_IO_FILE *, const char *, const char *) __THROW; extern _IO_FILE* _IO_new_proc_open (_IO_FILE *, const char *, const char *) __THROW; -extern _IO_FILE* _IO_old_proc_open (_IO_FILE *, const char *, const char *) - __THROW; +extern _IO_FILE* _IO_old_proc_open (_IO_FILE *, const char *, const char *); extern int _IO_proc_close (_IO_FILE *) __THROW; extern int _IO_new_proc_close (_IO_FILE *) __THROW; -extern int _IO_old_proc_close (_IO_FILE *) __THROW; +extern int _IO_old_proc_close (_IO_FILE *); /* Jumptable functions for strfiles. */ extern int _IO_str_underflow (_IO_FILE *) __THROW; @@ -660,73 +644,62 @@ extern int _IO_vsnprintf (char *string, extern _IO_size_t _IO_getline (_IO_FILE *,char *, _IO_size_t, int, int); extern _IO_size_t _IO_getline_info (_IO_FILE *,char *, _IO_size_t, int, int, int *); -extern _IO_ssize_t _IO_getdelim (char **, _IO_size_t *, int, _IO_FILE *) - __THROW; +extern _IO_ssize_t _IO_getdelim (char **, _IO_size_t *, int, _IO_FILE *); extern _IO_size_t _IO_getwline (_IO_FILE *,wchar_t *, _IO_size_t, wint_t, int); extern _IO_size_t _IO_getwline_info (_IO_FILE *,wchar_t *, _IO_size_t, wint_t, int, wint_t *); -extern double _IO_strtod (const char *, char **) __THROW; -extern char *_IO_dtoa (double __d, int __mode, int __ndigits, - int *__decpt, int *__sign, char **__rve) __THROW; -extern int _IO_outfloat (double __value, _IO_FILE *__sb, int __type, - int __width, int __precision, int __flags, - int __sign_mode, int __fill) __THROW; extern struct _IO_FILE_plus *_IO_list_all; extern void (*_IO_cleanup_registration_needed) (void); /* Prototype for functions with alternative entry point. */ -extern int _IO_flush_all_internal (void) __THROW; -extern unsigned _IO_adjust_column_internal (unsigned, const char *, int) - __THROW; +extern int _IO_flush_all_internal (void); +extern unsigned _IO_adjust_column_internal (unsigned, const char *, int); -extern int _IO_default_uflow_internal (_IO_FILE *) __THROW; +extern int _IO_default_uflow_internal (_IO_FILE *); extern void _IO_default_finish_internal (_IO_FILE *, int) __THROW; extern int _IO_default_pbackfail_internal (_IO_FILE *, int) __THROW; extern _IO_size_t _IO_default_xsputn_internal (_IO_FILE *, const void *, - _IO_size_t) __THROW; -extern _IO_size_t _IO_default_xsgetn_internal (_IO_FILE *, void *, _IO_size_t) - __THROW; + _IO_size_t); +extern _IO_size_t _IO_default_xsgetn_internal (_IO_FILE *, void *, _IO_size_t); extern int _IO_default_doallocate_internal (_IO_FILE *) __THROW; extern void _IO_wdefault_finish_internal (_IO_FILE *, int) __THROW; extern wint_t _IO_wdefault_pbackfail_internal (_IO_FILE *, wint_t) __THROW; extern _IO_size_t _IO_wdefault_xsputn_internal (_IO_FILE *, const void *, - _IO_size_t) __THROW; + _IO_size_t); extern _IO_size_t _IO_wdefault_xsgetn_internal (_IO_FILE *, void *, - _IO_size_t) __THROW; + _IO_size_t); extern int _IO_wdefault_doallocate_internal (_IO_FILE *) __THROW; -extern wint_t _IO_wdefault_uflow_internal (_IO_FILE *) __THROW; +extern wint_t _IO_wdefault_uflow_internal (_IO_FILE *); extern int _IO_file_doallocate_internal (_IO_FILE *) __THROW; -extern _IO_FILE* _IO_file_setbuf_internal (_IO_FILE *, char *, _IO_ssize_t) - __THROW; +extern _IO_FILE* _IO_file_setbuf_internal (_IO_FILE *, char *, _IO_ssize_t); extern _IO_off64_t _IO_file_seekoff_internal (_IO_FILE *, _IO_off64_t, - int, int) __THROW; + int, int); extern _IO_size_t _IO_file_xsputn_internal (_IO_FILE *, const void *, - _IO_size_t) __THROW; -extern _IO_size_t _IO_file_xsgetn_internal (_IO_FILE *, void *, _IO_size_t) - __THROW; + _IO_size_t); +extern _IO_size_t _IO_file_xsgetn_internal (_IO_FILE *, void *, _IO_size_t); extern int _IO_file_stat_internal (_IO_FILE *, void *) __THROW; extern int _IO_file_close_internal (_IO_FILE *) __THROW; -extern int _IO_file_close_it_internal (_IO_FILE *) __THROW; -extern int _IO_file_underflow_internal (_IO_FILE *) __THROW; -extern int _IO_file_overflow_internal (_IO_FILE *, int) __THROW; +extern int _IO_file_close_it_internal (_IO_FILE *); +extern int _IO_file_underflow_internal (_IO_FILE *); +extern int _IO_file_overflow_internal (_IO_FILE *, int); extern void _IO_file_init_internal (struct _IO_FILE_plus *) __THROW; -extern _IO_FILE* _IO_file_attach_internal (_IO_FILE *, int) __THROW; +extern _IO_FILE* _IO_file_attach_internal (_IO_FILE *, int); extern _IO_FILE* _IO_file_fopen_internal (_IO_FILE *, const char *, - const char *, int) __THROW; + const char *, int); extern _IO_ssize_t _IO_file_read_internal (_IO_FILE *, void *, _IO_ssize_t); -extern int _IO_file_sync_internal (_IO_FILE *) __THROW; +extern int _IO_file_sync_internal (_IO_FILE *); extern _IO_off64_t _IO_file_seek_internal (_IO_FILE *, _IO_off64_t, int) __THROW; -extern void _IO_file_finish_internal (_IO_FILE *, int) __THROW; +extern void _IO_file_finish_internal (_IO_FILE *, int); extern _IO_size_t _IO_wfile_xsputn_internal (_IO_FILE *, const void *, - _IO_size_t) __THROW; + _IO_size_t); extern _IO_off64_t _IO_wfile_seekoff_internal (_IO_FILE *, _IO_off64_t, - int, int) __THROW; -extern wint_t _IO_wfile_sync_internal (_IO_FILE *) __THROW; + int, int); +extern wint_t _IO_wfile_sync_internal (_IO_FILE *); extern int _IO_str_underflow_internal (_IO_FILE *) __THROW; extern int _IO_str_overflow_internal (_IO_FILE *, int) __THROW; @@ -747,12 +720,12 @@ extern void _IO_wdoallocbuf_internal (_I extern _IO_size_t _IO_sgetn_internal (_IO_FILE *, void *, _IO_size_t); extern void _IO_flush_all_linebuffered_internal (void) __THROW; -extern int _IO_switch_to_wget_mode_internal (_IO_FILE *) __THROW; +extern int _IO_switch_to_wget_mode_internal (_IO_FILE *); extern void _IO_unsave_markers_internal (_IO_FILE *) __THROW; extern void _IO_switch_to_main_wget_area_internal (_IO_FILE *) __THROW; extern int _IO_wdo_write_internal (_IO_FILE *, const wchar_t *, _IO_size_t); extern int _IO_do_write_internal (_IO_FILE *, const char *, _IO_size_t); -extern _IO_ssize_t _IO_padn_internal (_IO_FILE *, int, _IO_ssize_t) __THROW; +extern _IO_ssize_t _IO_padn_internal (_IO_FILE *, int, _IO_ssize_t); extern _IO_size_t _IO_getline_info_internal (_IO_FILE *,char *, _IO_size_t, int, int, int *); extern _IO_size_t _IO_getline_internal (_IO_FILE *, char *, _IO_size_t, int, @@ -762,7 +735,7 @@ extern void _IO_free_backup_area_interna extern void _IO_switch_to_wbackup_area_internal (_IO_FILE *) __THROW; extern void _IO_setb_internal (_IO_FILE *, char *, char *, int) __THROW; extern wint_t _IO_sputbackwc_internal (_IO_FILE *, wint_t) __THROW; -extern int _IO_switch_to_get_mode_internal (_IO_FILE *) __THROW; +extern int _IO_switch_to_get_mode_internal (_IO_FILE *); extern int _IO_vfscanf_internal (_IO_FILE * __restrict, const char * __restrict, _IO_va_list, int *__restrict); @@ -772,9 +745,9 @@ extern void _IO_doallocbuf_internal (_IO extern void _IO_wsetb_internal (_IO_FILE *, wchar_t *, wchar_t *, int) __THROW; extern _IO_off64_t _IO_seekoff_unlocked (_IO_FILE *, _IO_off64_t, int, int) - attribute_hidden __THROW; + attribute_hidden; extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int) - attribute_hidden __THROW; + attribute_hidden; extern int _IO_putc_internal (int __c, _IO_FILE *__fp); extern void _IO_init_internal (_IO_FILE *, int) __THROW; extern void _IO_un_link_internal (struct _IO_FILE_plus *) __THROW; @@ -866,12 +839,6 @@ extern void _IO_un_link_internal (struct #ifndef OS_FSTAT # define OS_FSTAT fstat #endif -struct stat; -extern _IO_ssize_t _IO_read (int, void *, _IO_size_t); -extern _IO_ssize_t _IO_write (int, const void *, _IO_size_t); -extern _IO_off64_t _IO_lseek (int, _IO_off64_t, int) __THROW; -extern int _IO_close (int); -extern int _IO_fstat (int, struct stat *) __THROW; extern int _IO_vscanf (const char *, _IO_va_list) __THROW; /* _IO_pos_BAD is an _IO_off64_t value indicating error, unknown, or EOF. */ diff -pNur -x CVS -x libidn glibc-2.5/libio/Makefile glibc-2.5-branch/libio/Makefile --- glibc-2.5/libio/Makefile 2006-08-14 15:12:27.000000000 -0700 +++ glibc-2.5-branch/libio/Makefile 2007-01-12 09:25:38.000000000 -0800 @@ -57,7 +57,8 @@ tests = tst_swprintf tst_wprintf tst_sws bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ tst-memstream1 tst-memstream2 \ tst-wmemstream1 tst-wmemstream2 \ - bug-memstream1 bug-wmemstream1 + bug-memstream1 bug-wmemstream1 \ + tst-setvbuf1 test-srcs = test-freopen all: # Make this the default target; it will be defined in Rules. diff -pNur -x CVS -x libidn glibc-2.5/libio/oldfileops.c glibc-2.5-branch/libio/oldfileops.c --- glibc-2.5/libio/oldfileops.c 2005-10-17 08:54:13.000000000 -0700 +++ glibc-2.5-branch/libio/oldfileops.c 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1995, 1997-2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-2004, 2005, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -271,7 +272,7 @@ _IO_old_file_setbuf (fp, p, len) return fp; } -static int old_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; +static int old_do_write (_IO_FILE *, const char *, _IO_size_t); /* Write TO_DO bytes from DATA to FP. Then mark FP as having empty buffers. */ diff -pNur -x CVS -x libidn glibc-2.5/libio/tst-setvbuf1.c glibc-2.5-branch/libio/tst-setvbuf1.c --- glibc-2.5/libio/tst-setvbuf1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/libio/tst-setvbuf1.c 2007-01-12 09:25:38.000000000 -0800 @@ -0,0 +1,39 @@ +/* Dereived from the test case in BZ #2337. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +static char buf[512] __attribute__ ((aligned (4096))); + + +static int +do_test (void) +{ + setlocale (LC_ALL, "de_DE.UTF-8"); + + FILE *fp = fdopen (dup (STDOUT_FILENO), "a"); + if (fp == NULL) + error (EXIT_FAILURE, errno, "fdopen(,\"a\")"); + + setvbuf (fp, buf, _IOFBF, sizeof (buf)); + + /* fwprintf to unbuffered stream. */ + fwprintf (fp, L"hello.\n"); + + fclose (fp); + + /* touch my buffer */ + buf[45] = 'a'; + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/libio/tst-wmemstream1.c glibc-2.5-branch/libio/tst-wmemstream1.c --- glibc-2.5/libio/tst-wmemstream1.c 2006-01-11 18:02:27.000000000 -0800 +++ glibc-2.5-branch/libio/tst-wmemstream1.c 2006-09-29 17:06:33.000000000 -0700 @@ -1,3 +1,5 @@ +#include + #define CHAR_T wchar_t #define W(o) L##o #define OPEN_MEMSTREAM open_wmemstream diff -pNur -x CVS -x libidn glibc-2.5/libio/tst-wmemstream2.c glibc-2.5-branch/libio/tst-wmemstream2.c --- glibc-2.5/libio/tst-wmemstream2.c 2006-01-11 18:02:27.000000000 -0800 +++ glibc-2.5-branch/libio/tst-wmemstream2.c 2006-09-29 17:06:33.000000000 -0700 @@ -1,3 +1,5 @@ +#include + #define CHAR_T wchar_t #define W(o) L##o #define OPEN_MEMSTREAM open_wmemstream diff -pNur -x CVS -x libidn glibc-2.5/libio/wfiledoalloc.c glibc-2.5-branch/libio/wfiledoalloc.c --- glibc-2.5/libio/wfiledoalloc.c 2002-07-05 23:35:54.000000000 -0700 +++ glibc-2.5-branch/libio/wfiledoalloc.c 2007-01-12 09:25:38.000000000 -0800 @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 1999, 2000, 2002, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -85,35 +86,20 @@ _IO_wfile_doallocate (fp) _IO_FILE *fp; { _IO_size_t size; - int couldbetty; wchar_t *p; - struct _G_stat64 st; /* Allocate room for the external buffer. */ if (fp->_IO_buf_base == NULL) INTUSE(_IO_file_doallocate) (fp); - if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0) - { - couldbetty = 0; - size = _IO_BUFSIZ; -#if 0 - /* do not try to optimise fseek() */ - fp->_flags |= __SNPT; -#endif - } - else - { - couldbetty = S_ISCHR (st.st_mode); -#if _IO_HAVE_ST_BLKSIZE - size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize; -#else - size = _IO_BUFSIZ; -#endif - } + /* If narrow buffer is user allocated (set by setvbuf etc.), + use that size as the size of the wide buffer, when it is + allocated by _IO_file_doallocate, multiply that by size + of the wide character. */ + size = fp->_IO_buf_end - fp->_IO_buf_base; + if ((fp->_flags & _IO_USER_BUF)) + size = (size + sizeof (wchar_t) - 1) / sizeof (wchar_t); ALLOC_WBUF (p, size * sizeof (wchar_t), EOF); INTUSE(_IO_wsetb) (fp, p, p + size, 1); - if (couldbetty && isatty (fp->_fileno)) - fp->_flags |= _IO_LINE_BUF; return 1; } diff -pNur -x CVS -x libidn glibc-2.5/libio/wgenops.c glibc-2.5-branch/libio/wgenops.c --- glibc-2.5/libio/wgenops.c 2006-02-12 13:20:57.000000000 -0800 +++ glibc-2.5-branch/libio/wgenops.c 2007-01-12 09:25:38.000000000 -0800 @@ -115,14 +115,14 @@ _IO_wsetb (f, b, eb, a) wchar_t *eb; int a; { - if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF)) + if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF)) FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t)); f->_wide_data->_IO_buf_base = b; f->_wide_data->_IO_buf_end = eb; if (a) - f->_flags &= ~_IO_USER_BUF; + f->_flags2 &= ~_IO_FLAGS2_USER_WBUF; else - f->_flags |= _IO_USER_BUF; + f->_flags2 |= _IO_FLAGS2_USER_WBUF; } INTDEF(_IO_wsetb) @@ -198,7 +198,7 @@ _IO_wdefault_finish (fp, dummy) int dummy; { struct _IO_marker *mark; - if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF)) + if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF)) { FREE_BUF (fp->_wide_data->_IO_buf_base, _IO_wblen (fp) * sizeof (wchar_t)); diff -pNur -x CVS -x libidn glibc-2.5/libio/wmemstream.c glibc-2.5-branch/libio/wmemstream.c --- glibc-2.5/libio/wmemstream.c 2006-08-14 15:13:48.000000000 -0700 +++ glibc-2.5-branch/libio/wmemstream.c 2007-01-12 09:25:38.000000000 -0800 @@ -20,6 +20,7 @@ #include "strfile.h" #include #include +#include struct _IO_FILE_wmemstream @@ -91,7 +92,7 @@ open_wmemstream (bufloc, sizeloc) _IO_fwide (&new_f->fp._sf._sbf._f, 1); _IO_wstr_init_static (&new_f->fp._sf._sbf._f, buf, _IO_BUFSIZ / sizeof (wchar_t), buf); - new_f->fp._sf._sbf._f._flags &= ~_IO_USER_BUF; + new_f->fp._sf._sbf._f._flags2 &= ~_IO_FLAGS2_USER_WBUF; new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc; new_f->fp._sf._s._free_buffer = (_IO_free_type) free; diff -pNur -x CVS -x libidn glibc-2.5/libio/wstrops.c glibc-2.5-branch/libio/wstrops.c --- glibc-2.5/libio/wstrops.c 2006-08-14 15:14:53.000000000 -0700 +++ glibc-2.5-branch/libio/wstrops.c 2007-01-12 09:25:38.000000000 -0800 @@ -88,7 +88,7 @@ _IO_wstr_overflow (fp, c) pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base; if (pos >= (_IO_size_t) (_IO_wblen (fp) + flush_only)) { - if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */ + if (fp->_flags2 & _IO_FLAGS2_USER_WBUF) /* not allowed to enlarge */ return WEOF; else { @@ -182,7 +182,7 @@ enlarge_userbuf (_IO_FILE *fp, _IO_off64 _IO_ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base; /* Try to enlarge the buffer. */ - if (fp->_flags & _IO_USER_BUF) + if (fp->_flags2 & _IO_FLAGS2_USER_WBUF) /* User-provided buffer. */ return 1; @@ -335,7 +335,7 @@ _IO_wstr_finish (fp, dummy) _IO_FILE *fp; int dummy; { - if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF)) + if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF)) (((_IO_strfile *) fp)->_s._free_buffer) (fp->_wide_data->_IO_buf_base); fp->_wide_data->_IO_buf_base = NULL; diff -pNur -x CVS -x libidn glibc-2.5/locale/C-translit.h glibc-2.5-branch/locale/C-translit.h --- glibc-2.5/locale/C-translit.h 2003-04-06 15:16:16.000000000 -0700 +++ glibc-2.5-branch/locale/C-translit.h 2007-07-12 08:13:28.000000000 -0700 @@ -1,4 +1,4 @@ -#define NTRANSLIT 1352 +#define NTRANSLIT 1353 static const uint32_t translit_from_idx[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, @@ -113,7 +113,7 @@ static const uint32_t translit_from_idx[ 2616, 2618, 2620, 2622, 2624, 2626, 2628, 2630, 2632, 2634, 2636, 2638, 2640, 2642, 2644, 2646, 2648, 2650, 2652, 2654, 2656, 2658, 2660, 2662, 2664, 2666, 2668, 2670, 2672, 2674, 2676, 2678, 2680, 2682, 2684, 2686, - 2688, 2690, 2692, 2694, 2696, 2698, 2700, 2702 + 2688, 2690, 2692, 2694, 2696, 2698, 2700, 2702, 2704 }; static const wchar_t translit_from_tbl[] = L"\x00a0" L"\0" L"\x00a9" L"\0" L"\x00ab" L"\0" L"\x00ad" L"\0" L"\x00ae" @@ -132,335 +132,336 @@ static const wchar_t translit_from_tbl[] L"\0" L"\x201d" L"\0" L"\x201e" L"\0" L"\x201f" L"\0" L"\x2020" L"\0" L"\x2022" L"\0" L"\x2024" L"\0" L"\x2025" L"\0" L"\x2026" L"\0" L"\x202f" L"\0" L"\x2035" L"\0" L"\x2036" L"\0" L"\x2037" L"\0" L"\x2039" L"\0" - L"\x203a" L"\0" L"\x203c" L"\0" L"\x2047" L"\0" L"\x2048" L"\0" L"\x2049" - L"\0" L"\x205f" L"\0" L"\x2060" L"\0" L"\x2061" L"\0" L"\x2062" L"\0" - L"\x2063" L"\0" L"\x20a8" L"\0" L"\x20ac" L"\0" L"\x2100" L"\0" L"\x2101" - L"\0" L"\x2102" L"\0" L"\x2105" L"\0" L"\x2106" L"\0" L"\x210a" L"\0" - L"\x210b" L"\0" L"\x210c" L"\0" L"\x210d" L"\0" L"\x210e" L"\0" L"\x2110" - L"\0" L"\x2111" L"\0" L"\x2112" L"\0" L"\x2113" L"\0" L"\x2115" L"\0" - L"\x2116" L"\0" L"\x2119" L"\0" L"\x211a" L"\0" L"\x211b" L"\0" L"\x211c" - L"\0" L"\x211d" L"\0" L"\x2121" L"\0" L"\x2122" L"\0" L"\x2124" L"\0" - L"\x2126" L"\0" L"\x2128" L"\0" L"\x212c" L"\0" L"\x212d" L"\0" L"\x212e" - L"\0" L"\x212f" L"\0" L"\x2130" L"\0" L"\x2131" L"\0" L"\x2133" L"\0" - L"\x2134" L"\0" L"\x2139" L"\0" L"\x2145" L"\0" L"\x2146" L"\0" L"\x2147" - L"\0" L"\x2148" L"\0" L"\x2149" L"\0" L"\x2153" L"\0" L"\x2154" L"\0" - L"\x2155" L"\0" L"\x2156" L"\0" L"\x2157" L"\0" L"\x2158" L"\0" L"\x2159" - L"\0" L"\x215a" L"\0" L"\x215b" L"\0" L"\x215c" L"\0" L"\x215d" L"\0" - L"\x215e" L"\0" L"\x215f" L"\0" L"\x2160" L"\0" L"\x2161" L"\0" L"\x2162" - L"\0" L"\x2163" L"\0" L"\x2164" L"\0" L"\x2165" L"\0" L"\x2166" L"\0" - L"\x2167" L"\0" L"\x2168" L"\0" L"\x2169" L"\0" L"\x216a" L"\0" L"\x216b" - L"\0" L"\x216c" L"\0" L"\x216d" L"\0" L"\x216e" L"\0" L"\x216f" L"\0" - L"\x2170" L"\0" L"\x2171" L"\0" L"\x2172" L"\0" L"\x2173" L"\0" L"\x2174" - L"\0" L"\x2175" L"\0" L"\x2176" L"\0" L"\x2177" L"\0" L"\x2178" L"\0" - L"\x2179" L"\0" L"\x217a" L"\0" L"\x217b" L"\0" L"\x217c" L"\0" L"\x217d" - L"\0" L"\x217e" L"\0" L"\x217f" L"\0" L"\x2190" L"\0" L"\x2192" L"\0" - L"\x2194" L"\0" L"\x21d0" L"\0" L"\x21d2" L"\0" L"\x21d4" L"\0" L"\x2212" - L"\0" L"\x2215" L"\0" L"\x2216" L"\0" L"\x2217" L"\0" L"\x2223" L"\0" - L"\x2236" L"\0" L"\x223c" L"\0" L"\x2264" L"\0" L"\x2265" L"\0" L"\x226a" - L"\0" L"\x226b" L"\0" L"\x22d8" L"\0" L"\x22d9" L"\0" L"\x2400" L"\0" - L"\x2401" L"\0" L"\x2402" L"\0" L"\x2403" L"\0" L"\x2404" L"\0" L"\x2405" - L"\0" L"\x2406" L"\0" L"\x2407" L"\0" L"\x2408" L"\0" L"\x2409" L"\0" - L"\x240a" L"\0" L"\x240b" L"\0" L"\x240c" L"\0" L"\x240d" L"\0" L"\x240e" - L"\0" L"\x240f" L"\0" L"\x2410" L"\0" L"\x2411" L"\0" L"\x2412" L"\0" - L"\x2413" L"\0" L"\x2414" L"\0" L"\x2415" L"\0" L"\x2416" L"\0" L"\x2417" - L"\0" L"\x2418" L"\0" L"\x2419" L"\0" L"\x241a" L"\0" L"\x241b" L"\0" - L"\x241c" L"\0" L"\x241d" L"\0" L"\x241e" L"\0" L"\x241f" L"\0" L"\x2420" - L"\0" L"\x2421" L"\0" L"\x2423" L"\0" L"\x2424" L"\0" L"\x2460" L"\0" - L"\x2461" L"\0" L"\x2462" L"\0" L"\x2463" L"\0" L"\x2464" L"\0" L"\x2465" - L"\0" L"\x2466" L"\0" L"\x2467" L"\0" L"\x2468" L"\0" L"\x2469" L"\0" - L"\x246a" L"\0" L"\x246b" L"\0" L"\x246c" L"\0" L"\x246d" L"\0" L"\x246e" - L"\0" L"\x246f" L"\0" L"\x2470" L"\0" L"\x2471" L"\0" L"\x2472" L"\0" - L"\x2473" L"\0" L"\x2474" L"\0" L"\x2475" L"\0" L"\x2476" L"\0" L"\x2477" - L"\0" L"\x2478" L"\0" L"\x2479" L"\0" L"\x247a" L"\0" L"\x247b" L"\0" - L"\x247c" L"\0" L"\x247d" L"\0" L"\x247e" L"\0" L"\x247f" L"\0" L"\x2480" - L"\0" L"\x2481" L"\0" L"\x2482" L"\0" L"\x2483" L"\0" L"\x2484" L"\0" - L"\x2485" L"\0" L"\x2486" L"\0" L"\x2487" L"\0" L"\x2488" L"\0" L"\x2489" - L"\0" L"\x248a" L"\0" L"\x248b" L"\0" L"\x248c" L"\0" L"\x248d" L"\0" - L"\x248e" L"\0" L"\x248f" L"\0" L"\x2490" L"\0" L"\x2491" L"\0" L"\x2492" - L"\0" L"\x2493" L"\0" L"\x2494" L"\0" L"\x2495" L"\0" L"\x2496" L"\0" - L"\x2497" L"\0" L"\x2498" L"\0" L"\x2499" L"\0" L"\x249a" L"\0" L"\x249b" - L"\0" L"\x249c" L"\0" L"\x249d" L"\0" L"\x249e" L"\0" L"\x249f" L"\0" - L"\x24a0" L"\0" L"\x24a1" L"\0" L"\x24a2" L"\0" L"\x24a3" L"\0" L"\x24a4" - L"\0" L"\x24a5" L"\0" L"\x24a6" L"\0" L"\x24a7" L"\0" L"\x24a8" L"\0" - L"\x24a9" L"\0" L"\x24aa" L"\0" L"\x24ab" L"\0" L"\x24ac" L"\0" L"\x24ad" - L"\0" L"\x24ae" L"\0" L"\x24af" L"\0" L"\x24b0" L"\0" L"\x24b1" L"\0" - L"\x24b2" L"\0" L"\x24b3" L"\0" L"\x24b4" L"\0" L"\x24b5" L"\0" L"\x24b6" - L"\0" L"\x24b7" L"\0" L"\x24b8" L"\0" L"\x24b9" L"\0" L"\x24ba" L"\0" - L"\x24bb" L"\0" L"\x24bc" L"\0" L"\x24bd" L"\0" L"\x24be" L"\0" L"\x24bf" - L"\0" L"\x24c0" L"\0" L"\x24c1" L"\0" L"\x24c2" L"\0" L"\x24c3" L"\0" - L"\x24c4" L"\0" L"\x24c5" L"\0" L"\x24c6" L"\0" L"\x24c7" L"\0" L"\x24c8" - L"\0" L"\x24c9" L"\0" L"\x24ca" L"\0" L"\x24cb" L"\0" L"\x24cc" L"\0" - L"\x24cd" L"\0" L"\x24ce" L"\0" L"\x24cf" L"\0" L"\x24d0" L"\0" L"\x24d1" - L"\0" L"\x24d2" L"\0" L"\x24d3" L"\0" L"\x24d4" L"\0" L"\x24d5" L"\0" - L"\x24d6" L"\0" L"\x24d7" L"\0" L"\x24d8" L"\0" L"\x24d9" L"\0" L"\x24da" - L"\0" L"\x24db" L"\0" L"\x24dc" L"\0" L"\x24dd" L"\0" L"\x24de" L"\0" - L"\x24df" L"\0" L"\x24e0" L"\0" L"\x24e1" L"\0" L"\x24e2" L"\0" L"\x24e3" - L"\0" L"\x24e4" L"\0" L"\x24e5" L"\0" L"\x24e6" L"\0" L"\x24e7" L"\0" - L"\x24e8" L"\0" L"\x24e9" L"\0" L"\x24ea" L"\0" L"\x2500" L"\0" L"\x2502" - L"\0" L"\x250c" L"\0" L"\x2510" L"\0" L"\x2514" L"\0" L"\x2518" L"\0" - L"\x251c" L"\0" L"\x2524" L"\0" L"\x252c" L"\0" L"\x2534" L"\0" L"\x253c" - L"\0" L"\x25e6" L"\0" L"\x2a74" L"\0" L"\x2a75" L"\0" L"\x2a76" L"\0" - L"\x3000" L"\0" L"\x30a0" L"\0" L"\x3251" L"\0" L"\x3252" L"\0" L"\x3253" - L"\0" L"\x3254" L"\0" L"\x3255" L"\0" L"\x3256" L"\0" L"\x3257" L"\0" - L"\x3258" L"\0" L"\x3259" L"\0" L"\x325a" L"\0" L"\x325b" L"\0" L"\x325c" - L"\0" L"\x325d" L"\0" L"\x325e" L"\0" L"\x325f" L"\0" L"\x32b1" L"\0" - L"\x32b2" L"\0" L"\x32b3" L"\0" L"\x32b4" L"\0" L"\x32b5" L"\0" L"\x32b6" - L"\0" L"\x32b7" L"\0" L"\x32b8" L"\0" L"\x32b9" L"\0" L"\x32ba" L"\0" - L"\x32bb" L"\0" L"\x32bc" L"\0" L"\x32bd" L"\0" L"\x32be" L"\0" L"\x32bf" - L"\0" L"\x3371" L"\0" L"\x3372" L"\0" L"\x3373" L"\0" L"\x3374" L"\0" - L"\x3375" L"\0" L"\x3376" L"\0" L"\x3380" L"\0" L"\x3381" L"\0" L"\x3382" - L"\0" L"\x3383" L"\0" L"\x3384" L"\0" L"\x3385" L"\0" L"\x3386" L"\0" - L"\x3387" L"\0" L"\x3388" L"\0" L"\x3389" L"\0" L"\x338a" L"\0" L"\x338b" - L"\0" L"\x338c" L"\0" L"\x338d" L"\0" L"\x338e" L"\0" L"\x338f" L"\0" - L"\x3390" L"\0" L"\x3391" L"\0" L"\x3392" L"\0" L"\x3393" L"\0" L"\x3394" - L"\0" L"\x3395" L"\0" L"\x3396" L"\0" L"\x3397" L"\0" L"\x3398" L"\0" - L"\x3399" L"\0" L"\x339a" L"\0" L"\x339b" L"\0" L"\x339c" L"\0" L"\x339d" - L"\0" L"\x339e" L"\0" L"\x339f" L"\0" L"\x33a0" L"\0" L"\x33a1" L"\0" - L"\x33a2" L"\0" L"\x33a3" L"\0" L"\x33a4" L"\0" L"\x33a5" L"\0" L"\x33a6" - L"\0" L"\x33a7" L"\0" L"\x33a8" L"\0" L"\x33a9" L"\0" L"\x33aa" L"\0" - L"\x33ab" L"\0" L"\x33ac" L"\0" L"\x33ad" L"\0" L"\x33ae" L"\0" L"\x33af" - L"\0" L"\x33b0" L"\0" L"\x33b1" L"\0" L"\x33b2" L"\0" L"\x33b3" L"\0" - L"\x33b4" L"\0" L"\x33b5" L"\0" L"\x33b6" L"\0" L"\x33b7" L"\0" L"\x33b8" - L"\0" L"\x33b9" L"\0" L"\x33ba" L"\0" L"\x33bb" L"\0" L"\x33bc" L"\0" - L"\x33bd" L"\0" L"\x33be" L"\0" L"\x33bf" L"\0" L"\x33c2" L"\0" L"\x33c3" - L"\0" L"\x33c4" L"\0" L"\x33c5" L"\0" L"\x33c6" L"\0" L"\x33c7" L"\0" - L"\x33c8" L"\0" L"\x33c9" L"\0" L"\x33ca" L"\0" L"\x33cb" L"\0" L"\x33cc" - L"\0" L"\x33cd" L"\0" L"\x33ce" L"\0" L"\x33cf" L"\0" L"\x33d0" L"\0" - L"\x33d1" L"\0" L"\x33d2" L"\0" L"\x33d3" L"\0" L"\x33d4" L"\0" L"\x33d5" - L"\0" L"\x33d6" L"\0" L"\x33d7" L"\0" L"\x33d8" L"\0" L"\x33d9" L"\0" - L"\x33da" L"\0" L"\x33db" L"\0" L"\x33dc" L"\0" L"\x33dd" L"\0" L"\xfb00" - L"\0" L"\xfb01" L"\0" L"\xfb02" L"\0" L"\xfb03" L"\0" L"\xfb04" L"\0" - L"\xfb06" L"\0" L"\xfb29" L"\0" L"\xfe00" L"\0" L"\xfe01" L"\0" L"\xfe02" - L"\0" L"\xfe03" L"\0" L"\xfe04" L"\0" L"\xfe05" L"\0" L"\xfe06" L"\0" - L"\xfe07" L"\0" L"\xfe08" L"\0" L"\xfe09" L"\0" L"\xfe0a" L"\0" L"\xfe0b" - L"\0" L"\xfe0c" L"\0" L"\xfe0d" L"\0" L"\xfe0e" L"\0" L"\xfe0f" L"\0" - L"\xfe4d" L"\0" L"\xfe4e" L"\0" L"\xfe4f" L"\0" L"\xfe50" L"\0" L"\xfe52" - L"\0" L"\xfe54" L"\0" L"\xfe55" L"\0" L"\xfe56" L"\0" L"\xfe57" L"\0" - L"\xfe59" L"\0" L"\xfe5a" L"\0" L"\xfe5b" L"\0" L"\xfe5c" L"\0" L"\xfe5f" - L"\0" L"\xfe60" L"\0" L"\xfe61" L"\0" L"\xfe62" L"\0" L"\xfe63" L"\0" - L"\xfe64" L"\0" L"\xfe65" L"\0" L"\xfe66" L"\0" L"\xfe68" L"\0" L"\xfe69" - L"\0" L"\xfe6a" L"\0" L"\xfe6b" L"\0" L"\xfeff" L"\0" L"\xff01" L"\0" - L"\xff02" L"\0" L"\xff03" L"\0" L"\xff04" L"\0" L"\xff05" L"\0" L"\xff06" - L"\0" L"\xff07" L"\0" L"\xff08" L"\0" L"\xff09" L"\0" L"\xff0a" L"\0" - L"\xff0b" L"\0" L"\xff0c" L"\0" L"\xff0d" L"\0" L"\xff0e" L"\0" L"\xff0f" - L"\0" L"\xff10" L"\0" L"\xff11" L"\0" L"\xff12" L"\0" L"\xff13" L"\0" - L"\xff14" L"\0" L"\xff15" L"\0" L"\xff16" L"\0" L"\xff17" L"\0" L"\xff18" - L"\0" L"\xff19" L"\0" L"\xff1a" L"\0" L"\xff1b" L"\0" L"\xff1c" L"\0" - L"\xff1d" L"\0" L"\xff1e" L"\0" L"\xff1f" L"\0" L"\xff20" L"\0" L"\xff21" - L"\0" L"\xff22" L"\0" L"\xff23" L"\0" L"\xff24" L"\0" L"\xff25" L"\0" - L"\xff26" L"\0" L"\xff27" L"\0" L"\xff28" L"\0" L"\xff29" L"\0" L"\xff2a" - L"\0" L"\xff2b" L"\0" L"\xff2c" L"\0" L"\xff2d" L"\0" L"\xff2e" L"\0" - L"\xff2f" L"\0" L"\xff30" L"\0" L"\xff31" L"\0" L"\xff32" L"\0" L"\xff33" - L"\0" L"\xff34" L"\0" L"\xff35" L"\0" L"\xff36" L"\0" L"\xff37" L"\0" - L"\xff38" L"\0" L"\xff39" L"\0" L"\xff3a" L"\0" L"\xff3b" L"\0" L"\xff3c" - L"\0" L"\xff3d" L"\0" L"\xff3e" L"\0" L"\xff3f" L"\0" L"\xff40" L"\0" - L"\xff41" L"\0" L"\xff42" L"\0" L"\xff43" L"\0" L"\xff44" L"\0" L"\xff45" - L"\0" L"\xff46" L"\0" L"\xff47" L"\0" L"\xff48" L"\0" L"\xff49" L"\0" - L"\xff4a" L"\0" L"\xff4b" L"\0" L"\xff4c" L"\0" L"\xff4d" L"\0" L"\xff4e" - L"\0" L"\xff4f" L"\0" L"\xff50" L"\0" L"\xff51" L"\0" L"\xff52" L"\0" - L"\xff53" L"\0" L"\xff54" L"\0" L"\xff55" L"\0" L"\xff56" L"\0" L"\xff57" - L"\0" L"\xff58" L"\0" L"\xff59" L"\0" L"\xff5a" L"\0" L"\xff5b" L"\0" - L"\xff5c" L"\0" L"\xff5d" L"\0" L"\xff5e" L"\0" L"\x0001d400" L"\0" - L"\x0001d401" L"\0" L"\x0001d402" L"\0" L"\x0001d403" L"\0" L"\x0001d404" - L"\0" L"\x0001d405" L"\0" L"\x0001d406" L"\0" L"\x0001d407" L"\0" - L"\x0001d408" L"\0" L"\x0001d409" L"\0" L"\x0001d40a" L"\0" L"\x0001d40b" - L"\0" L"\x0001d40c" L"\0" L"\x0001d40d" L"\0" L"\x0001d40e" L"\0" - L"\x0001d40f" L"\0" L"\x0001d410" L"\0" L"\x0001d411" L"\0" L"\x0001d412" - L"\0" L"\x0001d413" L"\0" L"\x0001d414" L"\0" L"\x0001d415" L"\0" - L"\x0001d416" L"\0" L"\x0001d417" L"\0" L"\x0001d418" L"\0" L"\x0001d419" - L"\0" L"\x0001d41a" L"\0" L"\x0001d41b" L"\0" L"\x0001d41c" L"\0" - L"\x0001d41d" L"\0" L"\x0001d41e" L"\0" L"\x0001d41f" L"\0" L"\x0001d420" - L"\0" L"\x0001d421" L"\0" L"\x0001d422" L"\0" L"\x0001d423" L"\0" - L"\x0001d424" L"\0" L"\x0001d425" L"\0" L"\x0001d426" L"\0" L"\x0001d427" - L"\0" L"\x0001d428" L"\0" L"\x0001d429" L"\0" L"\x0001d42a" L"\0" - L"\x0001d42b" L"\0" L"\x0001d42c" L"\0" L"\x0001d42d" L"\0" L"\x0001d42e" - L"\0" L"\x0001d42f" L"\0" L"\x0001d430" L"\0" L"\x0001d431" L"\0" - L"\x0001d432" L"\0" L"\x0001d433" L"\0" L"\x0001d434" L"\0" L"\x0001d435" - L"\0" L"\x0001d436" L"\0" L"\x0001d437" L"\0" L"\x0001d438" L"\0" - L"\x0001d439" L"\0" L"\x0001d43a" L"\0" L"\x0001d43b" L"\0" L"\x0001d43c" - L"\0" L"\x0001d43d" L"\0" L"\x0001d43e" L"\0" L"\x0001d43f" L"\0" - L"\x0001d440" L"\0" L"\x0001d441" L"\0" L"\x0001d442" L"\0" L"\x0001d443" - L"\0" L"\x0001d444" L"\0" L"\x0001d445" L"\0" L"\x0001d446" L"\0" - L"\x0001d447" L"\0" L"\x0001d448" L"\0" L"\x0001d449" L"\0" L"\x0001d44a" - L"\0" L"\x0001d44b" L"\0" L"\x0001d44c" L"\0" L"\x0001d44d" L"\0" - L"\x0001d44e" L"\0" L"\x0001d44f" L"\0" L"\x0001d450" L"\0" L"\x0001d451" - L"\0" L"\x0001d452" L"\0" L"\x0001d453" L"\0" L"\x0001d454" L"\0" - L"\x0001d456" L"\0" L"\x0001d457" L"\0" L"\x0001d458" L"\0" L"\x0001d459" - L"\0" L"\x0001d45a" L"\0" L"\x0001d45b" L"\0" L"\x0001d45c" L"\0" - L"\x0001d45d" L"\0" L"\x0001d45e" L"\0" L"\x0001d45f" L"\0" L"\x0001d460" - L"\0" L"\x0001d461" L"\0" L"\x0001d462" L"\0" L"\x0001d463" L"\0" - L"\x0001d464" L"\0" L"\x0001d465" L"\0" L"\x0001d466" L"\0" L"\x0001d467" - L"\0" L"\x0001d468" L"\0" L"\x0001d469" L"\0" L"\x0001d46a" L"\0" - L"\x0001d46b" L"\0" L"\x0001d46c" L"\0" L"\x0001d46d" L"\0" L"\x0001d46e" - L"\0" L"\x0001d46f" L"\0" L"\x0001d470" L"\0" L"\x0001d471" L"\0" - L"\x0001d472" L"\0" L"\x0001d473" L"\0" L"\x0001d474" L"\0" L"\x0001d475" - L"\0" L"\x0001d476" L"\0" L"\x0001d477" L"\0" L"\x0001d478" L"\0" - L"\x0001d479" L"\0" L"\x0001d47a" L"\0" L"\x0001d47b" L"\0" L"\x0001d47c" - L"\0" L"\x0001d47d" L"\0" L"\x0001d47e" L"\0" L"\x0001d47f" L"\0" - L"\x0001d480" L"\0" L"\x0001d481" L"\0" L"\x0001d482" L"\0" L"\x0001d483" - L"\0" L"\x0001d484" L"\0" L"\x0001d485" L"\0" L"\x0001d486" L"\0" - L"\x0001d487" L"\0" L"\x0001d488" L"\0" L"\x0001d489" L"\0" L"\x0001d48a" - L"\0" L"\x0001d48b" L"\0" L"\x0001d48c" L"\0" L"\x0001d48d" L"\0" - L"\x0001d48e" L"\0" L"\x0001d48f" L"\0" L"\x0001d490" L"\0" L"\x0001d491" - L"\0" L"\x0001d492" L"\0" L"\x0001d493" L"\0" L"\x0001d494" L"\0" - L"\x0001d495" L"\0" L"\x0001d496" L"\0" L"\x0001d497" L"\0" L"\x0001d498" - L"\0" L"\x0001d499" L"\0" L"\x0001d49a" L"\0" L"\x0001d49b" L"\0" - L"\x0001d49c" L"\0" L"\x0001d49e" L"\0" L"\x0001d49f" L"\0" L"\x0001d4a2" - L"\0" L"\x0001d4a5" L"\0" L"\x0001d4a6" L"\0" L"\x0001d4a9" L"\0" - L"\x0001d4aa" L"\0" L"\x0001d4ab" L"\0" L"\x0001d4ac" L"\0" L"\x0001d4ae" - L"\0" L"\x0001d4af" L"\0" L"\x0001d4b0" L"\0" L"\x0001d4b1" L"\0" - L"\x0001d4b2" L"\0" L"\x0001d4b3" L"\0" L"\x0001d4b4" L"\0" L"\x0001d4b5" - L"\0" L"\x0001d4b6" L"\0" L"\x0001d4b7" L"\0" L"\x0001d4b8" L"\0" - L"\x0001d4b9" L"\0" L"\x0001d4bb" L"\0" L"\x0001d4bd" L"\0" L"\x0001d4be" - L"\0" L"\x0001d4bf" L"\0" L"\x0001d4c0" L"\0" L"\x0001d4c2" L"\0" - L"\x0001d4c3" L"\0" L"\x0001d4c5" L"\0" L"\x0001d4c6" L"\0" L"\x0001d4c7" - L"\0" L"\x0001d4c8" L"\0" L"\x0001d4c9" L"\0" L"\x0001d4ca" L"\0" - L"\x0001d4cb" L"\0" L"\x0001d4cc" L"\0" L"\x0001d4cd" L"\0" L"\x0001d4ce" - L"\0" L"\x0001d4cf" L"\0" L"\x0001d4d0" L"\0" L"\x0001d4d1" L"\0" - L"\x0001d4d2" L"\0" L"\x0001d4d3" L"\0" L"\x0001d4d4" L"\0" L"\x0001d4d5" - L"\0" L"\x0001d4d6" L"\0" L"\x0001d4d7" L"\0" L"\x0001d4d8" L"\0" - L"\x0001d4d9" L"\0" L"\x0001d4da" L"\0" L"\x0001d4db" L"\0" L"\x0001d4dc" - L"\0" L"\x0001d4dd" L"\0" L"\x0001d4de" L"\0" L"\x0001d4df" L"\0" - L"\x0001d4e0" L"\0" L"\x0001d4e1" L"\0" L"\x0001d4e2" L"\0" L"\x0001d4e3" - L"\0" L"\x0001d4e4" L"\0" L"\x0001d4e5" L"\0" L"\x0001d4e6" L"\0" - L"\x0001d4e7" L"\0" L"\x0001d4e8" L"\0" L"\x0001d4e9" L"\0" L"\x0001d4ea" - L"\0" L"\x0001d4eb" L"\0" L"\x0001d4ec" L"\0" L"\x0001d4ed" L"\0" - L"\x0001d4ee" L"\0" L"\x0001d4ef" L"\0" L"\x0001d4f0" L"\0" L"\x0001d4f1" - L"\0" L"\x0001d4f2" L"\0" L"\x0001d4f3" L"\0" L"\x0001d4f4" L"\0" - L"\x0001d4f5" L"\0" L"\x0001d4f6" L"\0" L"\x0001d4f7" L"\0" L"\x0001d4f8" - L"\0" L"\x0001d4f9" L"\0" L"\x0001d4fa" L"\0" L"\x0001d4fb" L"\0" - L"\x0001d4fc" L"\0" L"\x0001d4fd" L"\0" L"\x0001d4fe" L"\0" L"\x0001d4ff" - L"\0" L"\x0001d500" L"\0" L"\x0001d501" L"\0" L"\x0001d502" L"\0" - L"\x0001d503" L"\0" L"\x0001d504" L"\0" L"\x0001d505" L"\0" L"\x0001d507" - L"\0" L"\x0001d508" L"\0" L"\x0001d509" L"\0" L"\x0001d50a" L"\0" - L"\x0001d50d" L"\0" L"\x0001d50e" L"\0" L"\x0001d50f" L"\0" L"\x0001d510" - L"\0" L"\x0001d511" L"\0" L"\x0001d512" L"\0" L"\x0001d513" L"\0" - L"\x0001d514" L"\0" L"\x0001d516" L"\0" L"\x0001d517" L"\0" L"\x0001d518" - L"\0" L"\x0001d519" L"\0" L"\x0001d51a" L"\0" L"\x0001d51b" L"\0" - L"\x0001d51c" L"\0" L"\x0001d51e" L"\0" L"\x0001d51f" L"\0" L"\x0001d520" - L"\0" L"\x0001d521" L"\0" L"\x0001d522" L"\0" L"\x0001d523" L"\0" - L"\x0001d524" L"\0" L"\x0001d525" L"\0" L"\x0001d526" L"\0" L"\x0001d527" - L"\0" L"\x0001d528" L"\0" L"\x0001d529" L"\0" L"\x0001d52a" L"\0" - L"\x0001d52b" L"\0" L"\x0001d52c" L"\0" L"\x0001d52d" L"\0" L"\x0001d52e" - L"\0" L"\x0001d52f" L"\0" L"\x0001d530" L"\0" L"\x0001d531" L"\0" - L"\x0001d532" L"\0" L"\x0001d533" L"\0" L"\x0001d534" L"\0" L"\x0001d535" - L"\0" L"\x0001d536" L"\0" L"\x0001d537" L"\0" L"\x0001d538" L"\0" - L"\x0001d539" L"\0" L"\x0001d53b" L"\0" L"\x0001d53c" L"\0" L"\x0001d53d" - L"\0" L"\x0001d53e" L"\0" L"\x0001d540" L"\0" L"\x0001d541" L"\0" - L"\x0001d542" L"\0" L"\x0001d543" L"\0" L"\x0001d544" L"\0" L"\x0001d546" - L"\0" L"\x0001d54a" L"\0" L"\x0001d54b" L"\0" L"\x0001d54c" L"\0" - L"\x0001d54d" L"\0" L"\x0001d54e" L"\0" L"\x0001d54f" L"\0" L"\x0001d550" - L"\0" L"\x0001d552" L"\0" L"\x0001d553" L"\0" L"\x0001d554" L"\0" - L"\x0001d555" L"\0" L"\x0001d556" L"\0" L"\x0001d557" L"\0" L"\x0001d558" - L"\0" L"\x0001d559" L"\0" L"\x0001d55a" L"\0" L"\x0001d55b" L"\0" - L"\x0001d55c" L"\0" L"\x0001d55d" L"\0" L"\x0001d55e" L"\0" L"\x0001d55f" - L"\0" L"\x0001d560" L"\0" L"\x0001d561" L"\0" L"\x0001d562" L"\0" - L"\x0001d563" L"\0" L"\x0001d564" L"\0" L"\x0001d565" L"\0" L"\x0001d566" - L"\0" L"\x0001d567" L"\0" L"\x0001d568" L"\0" L"\x0001d569" L"\0" - L"\x0001d56a" L"\0" L"\x0001d56b" L"\0" L"\x0001d56c" L"\0" L"\x0001d56d" - L"\0" L"\x0001d56e" L"\0" L"\x0001d56f" L"\0" L"\x0001d570" L"\0" - L"\x0001d571" L"\0" L"\x0001d572" L"\0" L"\x0001d573" L"\0" L"\x0001d574" - L"\0" L"\x0001d575" L"\0" L"\x0001d576" L"\0" L"\x0001d577" L"\0" - L"\x0001d578" L"\0" L"\x0001d579" L"\0" L"\x0001d57a" L"\0" L"\x0001d57b" - L"\0" L"\x0001d57c" L"\0" L"\x0001d57d" L"\0" L"\x0001d57e" L"\0" - L"\x0001d57f" L"\0" L"\x0001d580" L"\0" L"\x0001d581" L"\0" L"\x0001d582" - L"\0" L"\x0001d583" L"\0" L"\x0001d584" L"\0" L"\x0001d585" L"\0" - L"\x0001d586" L"\0" L"\x0001d587" L"\0" L"\x0001d588" L"\0" L"\x0001d589" - L"\0" L"\x0001d58a" L"\0" L"\x0001d58b" L"\0" L"\x0001d58c" L"\0" - L"\x0001d58d" L"\0" L"\x0001d58e" L"\0" L"\x0001d58f" L"\0" L"\x0001d590" - L"\0" L"\x0001d591" L"\0" L"\x0001d592" L"\0" L"\x0001d593" L"\0" - L"\x0001d594" L"\0" L"\x0001d595" L"\0" L"\x0001d596" L"\0" L"\x0001d597" - L"\0" L"\x0001d598" L"\0" L"\x0001d599" L"\0" L"\x0001d59a" L"\0" - L"\x0001d59b" L"\0" L"\x0001d59c" L"\0" L"\x0001d59d" L"\0" L"\x0001d59e" - L"\0" L"\x0001d59f" L"\0" L"\x0001d5a0" L"\0" L"\x0001d5a1" L"\0" - L"\x0001d5a2" L"\0" L"\x0001d5a3" L"\0" L"\x0001d5a4" L"\0" L"\x0001d5a5" - L"\0" L"\x0001d5a6" L"\0" L"\x0001d5a7" L"\0" L"\x0001d5a8" L"\0" - L"\x0001d5a9" L"\0" L"\x0001d5aa" L"\0" L"\x0001d5ab" L"\0" L"\x0001d5ac" - L"\0" L"\x0001d5ad" L"\0" L"\x0001d5ae" L"\0" L"\x0001d5af" L"\0" - L"\x0001d5b0" L"\0" L"\x0001d5b1" L"\0" L"\x0001d5b2" L"\0" L"\x0001d5b3" - L"\0" L"\x0001d5b4" L"\0" L"\x0001d5b5" L"\0" L"\x0001d5b6" L"\0" - L"\x0001d5b7" L"\0" L"\x0001d5b8" L"\0" L"\x0001d5b9" L"\0" L"\x0001d5ba" - L"\0" L"\x0001d5bb" L"\0" L"\x0001d5bc" L"\0" L"\x0001d5bd" L"\0" - L"\x0001d5be" L"\0" L"\x0001d5bf" L"\0" L"\x0001d5c0" L"\0" L"\x0001d5c1" - L"\0" L"\x0001d5c2" L"\0" L"\x0001d5c3" L"\0" L"\x0001d5c4" L"\0" - L"\x0001d5c5" L"\0" L"\x0001d5c6" L"\0" L"\x0001d5c7" L"\0" L"\x0001d5c8" - L"\0" L"\x0001d5c9" L"\0" L"\x0001d5ca" L"\0" L"\x0001d5cb" L"\0" - L"\x0001d5cc" L"\0" L"\x0001d5cd" L"\0" L"\x0001d5ce" L"\0" L"\x0001d5cf" - L"\0" L"\x0001d5d0" L"\0" L"\x0001d5d1" L"\0" L"\x0001d5d2" L"\0" - L"\x0001d5d3" L"\0" L"\x0001d5d4" L"\0" L"\x0001d5d5" L"\0" L"\x0001d5d6" - L"\0" L"\x0001d5d7" L"\0" L"\x0001d5d8" L"\0" L"\x0001d5d9" L"\0" - L"\x0001d5da" L"\0" L"\x0001d5db" L"\0" L"\x0001d5dc" L"\0" L"\x0001d5dd" - L"\0" L"\x0001d5de" L"\0" L"\x0001d5df" L"\0" L"\x0001d5e0" L"\0" - L"\x0001d5e1" L"\0" L"\x0001d5e2" L"\0" L"\x0001d5e3" L"\0" L"\x0001d5e4" - L"\0" L"\x0001d5e5" L"\0" L"\x0001d5e6" L"\0" L"\x0001d5e7" L"\0" - L"\x0001d5e8" L"\0" L"\x0001d5e9" L"\0" L"\x0001d5ea" L"\0" L"\x0001d5eb" - L"\0" L"\x0001d5ec" L"\0" L"\x0001d5ed" L"\0" L"\x0001d5ee" L"\0" - L"\x0001d5ef" L"\0" L"\x0001d5f0" L"\0" L"\x0001d5f1" L"\0" L"\x0001d5f2" - L"\0" L"\x0001d5f3" L"\0" L"\x0001d5f4" L"\0" L"\x0001d5f5" L"\0" - L"\x0001d5f6" L"\0" L"\x0001d5f7" L"\0" L"\x0001d5f8" L"\0" L"\x0001d5f9" - L"\0" L"\x0001d5fa" L"\0" L"\x0001d5fb" L"\0" L"\x0001d5fc" L"\0" - L"\x0001d5fd" L"\0" L"\x0001d5fe" L"\0" L"\x0001d5ff" L"\0" L"\x0001d600" - L"\0" L"\x0001d601" L"\0" L"\x0001d602" L"\0" L"\x0001d603" L"\0" - L"\x0001d604" L"\0" L"\x0001d605" L"\0" L"\x0001d606" L"\0" L"\x0001d607" - L"\0" L"\x0001d608" L"\0" L"\x0001d609" L"\0" L"\x0001d60a" L"\0" - L"\x0001d60b" L"\0" L"\x0001d60c" L"\0" L"\x0001d60d" L"\0" L"\x0001d60e" - L"\0" L"\x0001d60f" L"\0" L"\x0001d610" L"\0" L"\x0001d611" L"\0" - L"\x0001d612" L"\0" L"\x0001d613" L"\0" L"\x0001d614" L"\0" L"\x0001d615" - L"\0" L"\x0001d616" L"\0" L"\x0001d617" L"\0" L"\x0001d618" L"\0" - L"\x0001d619" L"\0" L"\x0001d61a" L"\0" L"\x0001d61b" L"\0" L"\x0001d61c" - L"\0" L"\x0001d61d" L"\0" L"\x0001d61e" L"\0" L"\x0001d61f" L"\0" - L"\x0001d620" L"\0" L"\x0001d621" L"\0" L"\x0001d622" L"\0" L"\x0001d623" - L"\0" L"\x0001d624" L"\0" L"\x0001d625" L"\0" L"\x0001d626" L"\0" - L"\x0001d627" L"\0" L"\x0001d628" L"\0" L"\x0001d629" L"\0" L"\x0001d62a" - L"\0" L"\x0001d62b" L"\0" L"\x0001d62c" L"\0" L"\x0001d62d" L"\0" - L"\x0001d62e" L"\0" L"\x0001d62f" L"\0" L"\x0001d630" L"\0" L"\x0001d631" - L"\0" L"\x0001d632" L"\0" L"\x0001d633" L"\0" L"\x0001d634" L"\0" - L"\x0001d635" L"\0" L"\x0001d636" L"\0" L"\x0001d637" L"\0" L"\x0001d638" - L"\0" L"\x0001d639" L"\0" L"\x0001d63a" L"\0" L"\x0001d63b" L"\0" - L"\x0001d63c" L"\0" L"\x0001d63d" L"\0" L"\x0001d63e" L"\0" L"\x0001d63f" - L"\0" L"\x0001d640" L"\0" L"\x0001d641" L"\0" L"\x0001d642" L"\0" - L"\x0001d643" L"\0" L"\x0001d644" L"\0" L"\x0001d645" L"\0" L"\x0001d646" - L"\0" L"\x0001d647" L"\0" L"\x0001d648" L"\0" L"\x0001d649" L"\0" - L"\x0001d64a" L"\0" L"\x0001d64b" L"\0" L"\x0001d64c" L"\0" L"\x0001d64d" - L"\0" L"\x0001d64e" L"\0" L"\x0001d64f" L"\0" L"\x0001d650" L"\0" - L"\x0001d651" L"\0" L"\x0001d652" L"\0" L"\x0001d653" L"\0" L"\x0001d654" - L"\0" L"\x0001d655" L"\0" L"\x0001d656" L"\0" L"\x0001d657" L"\0" - L"\x0001d658" L"\0" L"\x0001d659" L"\0" L"\x0001d65a" L"\0" L"\x0001d65b" - L"\0" L"\x0001d65c" L"\0" L"\x0001d65d" L"\0" L"\x0001d65e" L"\0" - L"\x0001d65f" L"\0" L"\x0001d660" L"\0" L"\x0001d661" L"\0" L"\x0001d662" - L"\0" L"\x0001d663" L"\0" L"\x0001d664" L"\0" L"\x0001d665" L"\0" - L"\x0001d666" L"\0" L"\x0001d667" L"\0" L"\x0001d668" L"\0" L"\x0001d669" - L"\0" L"\x0001d66a" L"\0" L"\x0001d66b" L"\0" L"\x0001d66c" L"\0" - L"\x0001d66d" L"\0" L"\x0001d66e" L"\0" L"\x0001d66f" L"\0" L"\x0001d670" - L"\0" L"\x0001d671" L"\0" L"\x0001d672" L"\0" L"\x0001d673" L"\0" - L"\x0001d674" L"\0" L"\x0001d675" L"\0" L"\x0001d676" L"\0" L"\x0001d677" - L"\0" L"\x0001d678" L"\0" L"\x0001d679" L"\0" L"\x0001d67a" L"\0" - L"\x0001d67b" L"\0" L"\x0001d67c" L"\0" L"\x0001d67d" L"\0" L"\x0001d67e" - L"\0" L"\x0001d67f" L"\0" L"\x0001d680" L"\0" L"\x0001d681" L"\0" - L"\x0001d682" L"\0" L"\x0001d683" L"\0" L"\x0001d684" L"\0" L"\x0001d685" - L"\0" L"\x0001d686" L"\0" L"\x0001d687" L"\0" L"\x0001d688" L"\0" - L"\x0001d689" L"\0" L"\x0001d68a" L"\0" L"\x0001d68b" L"\0" L"\x0001d68c" - L"\0" L"\x0001d68d" L"\0" L"\x0001d68e" L"\0" L"\x0001d68f" L"\0" - L"\x0001d690" L"\0" L"\x0001d691" L"\0" L"\x0001d692" L"\0" L"\x0001d693" - L"\0" L"\x0001d694" L"\0" L"\x0001d695" L"\0" L"\x0001d696" L"\0" - L"\x0001d697" L"\0" L"\x0001d698" L"\0" L"\x0001d699" L"\0" L"\x0001d69a" - L"\0" L"\x0001d69b" L"\0" L"\x0001d69c" L"\0" L"\x0001d69d" L"\0" - L"\x0001d69e" L"\0" L"\x0001d69f" L"\0" L"\x0001d6a0" L"\0" L"\x0001d6a1" - L"\0" L"\x0001d6a2" L"\0" L"\x0001d6a3" L"\0" L"\x0001d7ce" L"\0" - L"\x0001d7cf" L"\0" L"\x0001d7d0" L"\0" L"\x0001d7d1" L"\0" L"\x0001d7d2" - L"\0" L"\x0001d7d3" L"\0" L"\x0001d7d4" L"\0" L"\x0001d7d5" L"\0" - L"\x0001d7d6" L"\0" L"\x0001d7d7" L"\0" L"\x0001d7d8" L"\0" L"\x0001d7d9" - L"\0" L"\x0001d7da" L"\0" L"\x0001d7db" L"\0" L"\x0001d7dc" L"\0" - L"\x0001d7dd" L"\0" L"\x0001d7de" L"\0" L"\x0001d7df" L"\0" L"\x0001d7e0" - L"\0" L"\x0001d7e1" L"\0" L"\x0001d7e2" L"\0" L"\x0001d7e3" L"\0" - L"\x0001d7e4" L"\0" L"\x0001d7e5" L"\0" L"\x0001d7e6" L"\0" L"\x0001d7e7" - L"\0" L"\x0001d7e8" L"\0" L"\x0001d7e9" L"\0" L"\x0001d7ea" L"\0" - L"\x0001d7eb" L"\0" L"\x0001d7ec" L"\0" L"\x0001d7ed" L"\0" L"\x0001d7ee" - L"\0" L"\x0001d7ef" L"\0" L"\x0001d7f0" L"\0" L"\x0001d7f1" L"\0" - L"\x0001d7f2" L"\0" L"\x0001d7f3" L"\0" L"\x0001d7f4" L"\0" L"\x0001d7f5" - L"\0" L"\x0001d7f6" L"\0" L"\x0001d7f7" L"\0" L"\x0001d7f8" L"\0" - L"\x0001d7f9" L"\0" L"\x0001d7fa" L"\0" L"\x0001d7fb" L"\0" L"\x0001d7fc" - L"\0" L"\x0001d7fd" L"\0" L"\x0001d7fe" L"\0" L"\x0001d7ff"; + L"\x203a" L"\0" L"\x203c" L"\0" L"\x2044" L"\0" L"\x2047" L"\0" L"\x2048" + L"\0" L"\x2049" L"\0" L"\x205f" L"\0" L"\x2060" L"\0" L"\x2061" L"\0" + L"\x2062" L"\0" L"\x2063" L"\0" L"\x20a8" L"\0" L"\x20ac" L"\0" L"\x2100" + L"\0" L"\x2101" L"\0" L"\x2102" L"\0" L"\x2105" L"\0" L"\x2106" L"\0" + L"\x210a" L"\0" L"\x210b" L"\0" L"\x210c" L"\0" L"\x210d" L"\0" L"\x210e" + L"\0" L"\x2110" L"\0" L"\x2111" L"\0" L"\x2112" L"\0" L"\x2113" L"\0" + L"\x2115" L"\0" L"\x2116" L"\0" L"\x2119" L"\0" L"\x211a" L"\0" L"\x211b" + L"\0" L"\x211c" L"\0" L"\x211d" L"\0" L"\x2121" L"\0" L"\x2122" L"\0" + L"\x2124" L"\0" L"\x2126" L"\0" L"\x2128" L"\0" L"\x212c" L"\0" L"\x212d" + L"\0" L"\x212e" L"\0" L"\x212f" L"\0" L"\x2130" L"\0" L"\x2131" L"\0" + L"\x2133" L"\0" L"\x2134" L"\0" L"\x2139" L"\0" L"\x2145" L"\0" L"\x2146" + L"\0" L"\x2147" L"\0" L"\x2148" L"\0" L"\x2149" L"\0" L"\x2153" L"\0" + L"\x2154" L"\0" L"\x2155" L"\0" L"\x2156" L"\0" L"\x2157" L"\0" L"\x2158" + L"\0" L"\x2159" L"\0" L"\x215a" L"\0" L"\x215b" L"\0" L"\x215c" L"\0" + L"\x215d" L"\0" L"\x215e" L"\0" L"\x215f" L"\0" L"\x2160" L"\0" L"\x2161" + L"\0" L"\x2162" L"\0" L"\x2163" L"\0" L"\x2164" L"\0" L"\x2165" L"\0" + L"\x2166" L"\0" L"\x2167" L"\0" L"\x2168" L"\0" L"\x2169" L"\0" L"\x216a" + L"\0" L"\x216b" L"\0" L"\x216c" L"\0" L"\x216d" L"\0" L"\x216e" L"\0" + L"\x216f" L"\0" L"\x2170" L"\0" L"\x2171" L"\0" L"\x2172" L"\0" L"\x2173" + L"\0" L"\x2174" L"\0" L"\x2175" L"\0" L"\x2176" L"\0" L"\x2177" L"\0" + L"\x2178" L"\0" L"\x2179" L"\0" L"\x217a" L"\0" L"\x217b" L"\0" L"\x217c" + L"\0" L"\x217d" L"\0" L"\x217e" L"\0" L"\x217f" L"\0" L"\x2190" L"\0" + L"\x2192" L"\0" L"\x2194" L"\0" L"\x21d0" L"\0" L"\x21d2" L"\0" L"\x21d4" + L"\0" L"\x2212" L"\0" L"\x2215" L"\0" L"\x2216" L"\0" L"\x2217" L"\0" + L"\x2223" L"\0" L"\x2236" L"\0" L"\x223c" L"\0" L"\x2264" L"\0" L"\x2265" + L"\0" L"\x226a" L"\0" L"\x226b" L"\0" L"\x22d8" L"\0" L"\x22d9" L"\0" + L"\x2400" L"\0" L"\x2401" L"\0" L"\x2402" L"\0" L"\x2403" L"\0" L"\x2404" + L"\0" L"\x2405" L"\0" L"\x2406" L"\0" L"\x2407" L"\0" L"\x2408" L"\0" + L"\x2409" L"\0" L"\x240a" L"\0" L"\x240b" L"\0" L"\x240c" L"\0" L"\x240d" + L"\0" L"\x240e" L"\0" L"\x240f" L"\0" L"\x2410" L"\0" L"\x2411" L"\0" + L"\x2412" L"\0" L"\x2413" L"\0" L"\x2414" L"\0" L"\x2415" L"\0" L"\x2416" + L"\0" L"\x2417" L"\0" L"\x2418" L"\0" L"\x2419" L"\0" L"\x241a" L"\0" + L"\x241b" L"\0" L"\x241c" L"\0" L"\x241d" L"\0" L"\x241e" L"\0" L"\x241f" + L"\0" L"\x2420" L"\0" L"\x2421" L"\0" L"\x2423" L"\0" L"\x2424" L"\0" + L"\x2460" L"\0" L"\x2461" L"\0" L"\x2462" L"\0" L"\x2463" L"\0" L"\x2464" + L"\0" L"\x2465" L"\0" L"\x2466" L"\0" L"\x2467" L"\0" L"\x2468" L"\0" + L"\x2469" L"\0" L"\x246a" L"\0" L"\x246b" L"\0" L"\x246c" L"\0" L"\x246d" + L"\0" L"\x246e" L"\0" L"\x246f" L"\0" L"\x2470" L"\0" L"\x2471" L"\0" + L"\x2472" L"\0" L"\x2473" L"\0" L"\x2474" L"\0" L"\x2475" L"\0" L"\x2476" + L"\0" L"\x2477" L"\0" L"\x2478" L"\0" L"\x2479" L"\0" L"\x247a" L"\0" + L"\x247b" L"\0" L"\x247c" L"\0" L"\x247d" L"\0" L"\x247e" L"\0" L"\x247f" + L"\0" L"\x2480" L"\0" L"\x2481" L"\0" L"\x2482" L"\0" L"\x2483" L"\0" + L"\x2484" L"\0" L"\x2485" L"\0" L"\x2486" L"\0" L"\x2487" L"\0" L"\x2488" + L"\0" L"\x2489" L"\0" L"\x248a" L"\0" L"\x248b" L"\0" L"\x248c" L"\0" + L"\x248d" L"\0" L"\x248e" L"\0" L"\x248f" L"\0" L"\x2490" L"\0" L"\x2491" + L"\0" L"\x2492" L"\0" L"\x2493" L"\0" L"\x2494" L"\0" L"\x2495" L"\0" + L"\x2496" L"\0" L"\x2497" L"\0" L"\x2498" L"\0" L"\x2499" L"\0" L"\x249a" + L"\0" L"\x249b" L"\0" L"\x249c" L"\0" L"\x249d" L"\0" L"\x249e" L"\0" + L"\x249f" L"\0" L"\x24a0" L"\0" L"\x24a1" L"\0" L"\x24a2" L"\0" L"\x24a3" + L"\0" L"\x24a4" L"\0" L"\x24a5" L"\0" L"\x24a6" L"\0" L"\x24a7" L"\0" + L"\x24a8" L"\0" L"\x24a9" L"\0" L"\x24aa" L"\0" L"\x24ab" L"\0" L"\x24ac" + L"\0" L"\x24ad" L"\0" L"\x24ae" L"\0" L"\x24af" L"\0" L"\x24b0" L"\0" + L"\x24b1" L"\0" L"\x24b2" L"\0" L"\x24b3" L"\0" L"\x24b4" L"\0" L"\x24b5" + L"\0" L"\x24b6" L"\0" L"\x24b7" L"\0" L"\x24b8" L"\0" L"\x24b9" L"\0" + L"\x24ba" L"\0" L"\x24bb" L"\0" L"\x24bc" L"\0" L"\x24bd" L"\0" L"\x24be" + L"\0" L"\x24bf" L"\0" L"\x24c0" L"\0" L"\x24c1" L"\0" L"\x24c2" L"\0" + L"\x24c3" L"\0" L"\x24c4" L"\0" L"\x24c5" L"\0" L"\x24c6" L"\0" L"\x24c7" + L"\0" L"\x24c8" L"\0" L"\x24c9" L"\0" L"\x24ca" L"\0" L"\x24cb" L"\0" + L"\x24cc" L"\0" L"\x24cd" L"\0" L"\x24ce" L"\0" L"\x24cf" L"\0" L"\x24d0" + L"\0" L"\x24d1" L"\0" L"\x24d2" L"\0" L"\x24d3" L"\0" L"\x24d4" L"\0" + L"\x24d5" L"\0" L"\x24d6" L"\0" L"\x24d7" L"\0" L"\x24d8" L"\0" L"\x24d9" + L"\0" L"\x24da" L"\0" L"\x24db" L"\0" L"\x24dc" L"\0" L"\x24dd" L"\0" + L"\x24de" L"\0" L"\x24df" L"\0" L"\x24e0" L"\0" L"\x24e1" L"\0" L"\x24e2" + L"\0" L"\x24e3" L"\0" L"\x24e4" L"\0" L"\x24e5" L"\0" L"\x24e6" L"\0" + L"\x24e7" L"\0" L"\x24e8" L"\0" L"\x24e9" L"\0" L"\x24ea" L"\0" L"\x2500" + L"\0" L"\x2502" L"\0" L"\x250c" L"\0" L"\x2510" L"\0" L"\x2514" L"\0" + L"\x2518" L"\0" L"\x251c" L"\0" L"\x2524" L"\0" L"\x252c" L"\0" L"\x2534" + L"\0" L"\x253c" L"\0" L"\x25e6" L"\0" L"\x2a74" L"\0" L"\x2a75" L"\0" + L"\x2a76" L"\0" L"\x3000" L"\0" L"\x30a0" L"\0" L"\x3251" L"\0" L"\x3252" + L"\0" L"\x3253" L"\0" L"\x3254" L"\0" L"\x3255" L"\0" L"\x3256" L"\0" + L"\x3257" L"\0" L"\x3258" L"\0" L"\x3259" L"\0" L"\x325a" L"\0" L"\x325b" + L"\0" L"\x325c" L"\0" L"\x325d" L"\0" L"\x325e" L"\0" L"\x325f" L"\0" + L"\x32b1" L"\0" L"\x32b2" L"\0" L"\x32b3" L"\0" L"\x32b4" L"\0" L"\x32b5" + L"\0" L"\x32b6" L"\0" L"\x32b7" L"\0" L"\x32b8" L"\0" L"\x32b9" L"\0" + L"\x32ba" L"\0" L"\x32bb" L"\0" L"\x32bc" L"\0" L"\x32bd" L"\0" L"\x32be" + L"\0" L"\x32bf" L"\0" L"\x3371" L"\0" L"\x3372" L"\0" L"\x3373" L"\0" + L"\x3374" L"\0" L"\x3375" L"\0" L"\x3376" L"\0" L"\x3380" L"\0" L"\x3381" + L"\0" L"\x3382" L"\0" L"\x3383" L"\0" L"\x3384" L"\0" L"\x3385" L"\0" + L"\x3386" L"\0" L"\x3387" L"\0" L"\x3388" L"\0" L"\x3389" L"\0" L"\x338a" + L"\0" L"\x338b" L"\0" L"\x338c" L"\0" L"\x338d" L"\0" L"\x338e" L"\0" + L"\x338f" L"\0" L"\x3390" L"\0" L"\x3391" L"\0" L"\x3392" L"\0" L"\x3393" + L"\0" L"\x3394" L"\0" L"\x3395" L"\0" L"\x3396" L"\0" L"\x3397" L"\0" + L"\x3398" L"\0" L"\x3399" L"\0" L"\x339a" L"\0" L"\x339b" L"\0" L"\x339c" + L"\0" L"\x339d" L"\0" L"\x339e" L"\0" L"\x339f" L"\0" L"\x33a0" L"\0" + L"\x33a1" L"\0" L"\x33a2" L"\0" L"\x33a3" L"\0" L"\x33a4" L"\0" L"\x33a5" + L"\0" L"\x33a6" L"\0" L"\x33a7" L"\0" L"\x33a8" L"\0" L"\x33a9" L"\0" + L"\x33aa" L"\0" L"\x33ab" L"\0" L"\x33ac" L"\0" L"\x33ad" L"\0" L"\x33ae" + L"\0" L"\x33af" L"\0" L"\x33b0" L"\0" L"\x33b1" L"\0" L"\x33b2" L"\0" + L"\x33b3" L"\0" L"\x33b4" L"\0" L"\x33b5" L"\0" L"\x33b6" L"\0" L"\x33b7" + L"\0" L"\x33b8" L"\0" L"\x33b9" L"\0" L"\x33ba" L"\0" L"\x33bb" L"\0" + L"\x33bc" L"\0" L"\x33bd" L"\0" L"\x33be" L"\0" L"\x33bf" L"\0" L"\x33c2" + L"\0" L"\x33c3" L"\0" L"\x33c4" L"\0" L"\x33c5" L"\0" L"\x33c6" L"\0" + L"\x33c7" L"\0" L"\x33c8" L"\0" L"\x33c9" L"\0" L"\x33ca" L"\0" L"\x33cb" + L"\0" L"\x33cc" L"\0" L"\x33cd" L"\0" L"\x33ce" L"\0" L"\x33cf" L"\0" + L"\x33d0" L"\0" L"\x33d1" L"\0" L"\x33d2" L"\0" L"\x33d3" L"\0" L"\x33d4" + L"\0" L"\x33d5" L"\0" L"\x33d6" L"\0" L"\x33d7" L"\0" L"\x33d8" L"\0" + L"\x33d9" L"\0" L"\x33da" L"\0" L"\x33db" L"\0" L"\x33dc" L"\0" L"\x33dd" + L"\0" L"\xfb00" L"\0" L"\xfb01" L"\0" L"\xfb02" L"\0" L"\xfb03" L"\0" + L"\xfb04" L"\0" L"\xfb06" L"\0" L"\xfb29" L"\0" L"\xfe00" L"\0" L"\xfe01" + L"\0" L"\xfe02" L"\0" L"\xfe03" L"\0" L"\xfe04" L"\0" L"\xfe05" L"\0" + L"\xfe06" L"\0" L"\xfe07" L"\0" L"\xfe08" L"\0" L"\xfe09" L"\0" L"\xfe0a" + L"\0" L"\xfe0b" L"\0" L"\xfe0c" L"\0" L"\xfe0d" L"\0" L"\xfe0e" L"\0" + L"\xfe0f" L"\0" L"\xfe4d" L"\0" L"\xfe4e" L"\0" L"\xfe4f" L"\0" L"\xfe50" + L"\0" L"\xfe52" L"\0" L"\xfe54" L"\0" L"\xfe55" L"\0" L"\xfe56" L"\0" + L"\xfe57" L"\0" L"\xfe59" L"\0" L"\xfe5a" L"\0" L"\xfe5b" L"\0" L"\xfe5c" + L"\0" L"\xfe5f" L"\0" L"\xfe60" L"\0" L"\xfe61" L"\0" L"\xfe62" L"\0" + L"\xfe63" L"\0" L"\xfe64" L"\0" L"\xfe65" L"\0" L"\xfe66" L"\0" L"\xfe68" + L"\0" L"\xfe69" L"\0" L"\xfe6a" L"\0" L"\xfe6b" L"\0" L"\xfeff" L"\0" + L"\xff01" L"\0" L"\xff02" L"\0" L"\xff03" L"\0" L"\xff04" L"\0" L"\xff05" + L"\0" L"\xff06" L"\0" L"\xff07" L"\0" L"\xff08" L"\0" L"\xff09" L"\0" + L"\xff0a" L"\0" L"\xff0b" L"\0" L"\xff0c" L"\0" L"\xff0d" L"\0" L"\xff0e" + L"\0" L"\xff0f" L"\0" L"\xff10" L"\0" L"\xff11" L"\0" L"\xff12" L"\0" + L"\xff13" L"\0" L"\xff14" L"\0" L"\xff15" L"\0" L"\xff16" L"\0" L"\xff17" + L"\0" L"\xff18" L"\0" L"\xff19" L"\0" L"\xff1a" L"\0" L"\xff1b" L"\0" + L"\xff1c" L"\0" L"\xff1d" L"\0" L"\xff1e" L"\0" L"\xff1f" L"\0" L"\xff20" + L"\0" L"\xff21" L"\0" L"\xff22" L"\0" L"\xff23" L"\0" L"\xff24" L"\0" + L"\xff25" L"\0" L"\xff26" L"\0" L"\xff27" L"\0" L"\xff28" L"\0" L"\xff29" + L"\0" L"\xff2a" L"\0" L"\xff2b" L"\0" L"\xff2c" L"\0" L"\xff2d" L"\0" + L"\xff2e" L"\0" L"\xff2f" L"\0" L"\xff30" L"\0" L"\xff31" L"\0" L"\xff32" + L"\0" L"\xff33" L"\0" L"\xff34" L"\0" L"\xff35" L"\0" L"\xff36" L"\0" + L"\xff37" L"\0" L"\xff38" L"\0" L"\xff39" L"\0" L"\xff3a" L"\0" L"\xff3b" + L"\0" L"\xff3c" L"\0" L"\xff3d" L"\0" L"\xff3e" L"\0" L"\xff3f" L"\0" + L"\xff40" L"\0" L"\xff41" L"\0" L"\xff42" L"\0" L"\xff43" L"\0" L"\xff44" + L"\0" L"\xff45" L"\0" L"\xff46" L"\0" L"\xff47" L"\0" L"\xff48" L"\0" + L"\xff49" L"\0" L"\xff4a" L"\0" L"\xff4b" L"\0" L"\xff4c" L"\0" L"\xff4d" + L"\0" L"\xff4e" L"\0" L"\xff4f" L"\0" L"\xff50" L"\0" L"\xff51" L"\0" + L"\xff52" L"\0" L"\xff53" L"\0" L"\xff54" L"\0" L"\xff55" L"\0" L"\xff56" + L"\0" L"\xff57" L"\0" L"\xff58" L"\0" L"\xff59" L"\0" L"\xff5a" L"\0" + L"\xff5b" L"\0" L"\xff5c" L"\0" L"\xff5d" L"\0" L"\xff5e" L"\0" + L"\x0001d400" L"\0" L"\x0001d401" L"\0" L"\x0001d402" L"\0" L"\x0001d403" + L"\0" L"\x0001d404" L"\0" L"\x0001d405" L"\0" L"\x0001d406" L"\0" + L"\x0001d407" L"\0" L"\x0001d408" L"\0" L"\x0001d409" L"\0" L"\x0001d40a" + L"\0" L"\x0001d40b" L"\0" L"\x0001d40c" L"\0" L"\x0001d40d" L"\0" + L"\x0001d40e" L"\0" L"\x0001d40f" L"\0" L"\x0001d410" L"\0" L"\x0001d411" + L"\0" L"\x0001d412" L"\0" L"\x0001d413" L"\0" L"\x0001d414" L"\0" + L"\x0001d415" L"\0" L"\x0001d416" L"\0" L"\x0001d417" L"\0" L"\x0001d418" + L"\0" L"\x0001d419" L"\0" L"\x0001d41a" L"\0" L"\x0001d41b" L"\0" + L"\x0001d41c" L"\0" L"\x0001d41d" L"\0" L"\x0001d41e" L"\0" L"\x0001d41f" + L"\0" L"\x0001d420" L"\0" L"\x0001d421" L"\0" L"\x0001d422" L"\0" + L"\x0001d423" L"\0" L"\x0001d424" L"\0" L"\x0001d425" L"\0" L"\x0001d426" + L"\0" L"\x0001d427" L"\0" L"\x0001d428" L"\0" L"\x0001d429" L"\0" + L"\x0001d42a" L"\0" L"\x0001d42b" L"\0" L"\x0001d42c" L"\0" L"\x0001d42d" + L"\0" L"\x0001d42e" L"\0" L"\x0001d42f" L"\0" L"\x0001d430" L"\0" + L"\x0001d431" L"\0" L"\x0001d432" L"\0" L"\x0001d433" L"\0" L"\x0001d434" + L"\0" L"\x0001d435" L"\0" L"\x0001d436" L"\0" L"\x0001d437" L"\0" + L"\x0001d438" L"\0" L"\x0001d439" L"\0" L"\x0001d43a" L"\0" L"\x0001d43b" + L"\0" L"\x0001d43c" L"\0" L"\x0001d43d" L"\0" L"\x0001d43e" L"\0" + L"\x0001d43f" L"\0" L"\x0001d440" L"\0" L"\x0001d441" L"\0" L"\x0001d442" + L"\0" L"\x0001d443" L"\0" L"\x0001d444" L"\0" L"\x0001d445" L"\0" + L"\x0001d446" L"\0" L"\x0001d447" L"\0" L"\x0001d448" L"\0" L"\x0001d449" + L"\0" L"\x0001d44a" L"\0" L"\x0001d44b" L"\0" L"\x0001d44c" L"\0" + L"\x0001d44d" L"\0" L"\x0001d44e" L"\0" L"\x0001d44f" L"\0" L"\x0001d450" + L"\0" L"\x0001d451" L"\0" L"\x0001d452" L"\0" L"\x0001d453" L"\0" + L"\x0001d454" L"\0" L"\x0001d456" L"\0" L"\x0001d457" L"\0" L"\x0001d458" + L"\0" L"\x0001d459" L"\0" L"\x0001d45a" L"\0" L"\x0001d45b" L"\0" + L"\x0001d45c" L"\0" L"\x0001d45d" L"\0" L"\x0001d45e" L"\0" L"\x0001d45f" + L"\0" L"\x0001d460" L"\0" L"\x0001d461" L"\0" L"\x0001d462" L"\0" + L"\x0001d463" L"\0" L"\x0001d464" L"\0" L"\x0001d465" L"\0" L"\x0001d466" + L"\0" L"\x0001d467" L"\0" L"\x0001d468" L"\0" L"\x0001d469" L"\0" + L"\x0001d46a" L"\0" L"\x0001d46b" L"\0" L"\x0001d46c" L"\0" L"\x0001d46d" + L"\0" L"\x0001d46e" L"\0" L"\x0001d46f" L"\0" L"\x0001d470" L"\0" + L"\x0001d471" L"\0" L"\x0001d472" L"\0" L"\x0001d473" L"\0" L"\x0001d474" + L"\0" L"\x0001d475" L"\0" L"\x0001d476" L"\0" L"\x0001d477" L"\0" + L"\x0001d478" L"\0" L"\x0001d479" L"\0" L"\x0001d47a" L"\0" L"\x0001d47b" + L"\0" L"\x0001d47c" L"\0" L"\x0001d47d" L"\0" L"\x0001d47e" L"\0" + L"\x0001d47f" L"\0" L"\x0001d480" L"\0" L"\x0001d481" L"\0" L"\x0001d482" + L"\0" L"\x0001d483" L"\0" L"\x0001d484" L"\0" L"\x0001d485" L"\0" + L"\x0001d486" L"\0" L"\x0001d487" L"\0" L"\x0001d488" L"\0" L"\x0001d489" + L"\0" L"\x0001d48a" L"\0" L"\x0001d48b" L"\0" L"\x0001d48c" L"\0" + L"\x0001d48d" L"\0" L"\x0001d48e" L"\0" L"\x0001d48f" L"\0" L"\x0001d490" + L"\0" L"\x0001d491" L"\0" L"\x0001d492" L"\0" L"\x0001d493" L"\0" + L"\x0001d494" L"\0" L"\x0001d495" L"\0" L"\x0001d496" L"\0" L"\x0001d497" + L"\0" L"\x0001d498" L"\0" L"\x0001d499" L"\0" L"\x0001d49a" L"\0" + L"\x0001d49b" L"\0" L"\x0001d49c" L"\0" L"\x0001d49e" L"\0" L"\x0001d49f" + L"\0" L"\x0001d4a2" L"\0" L"\x0001d4a5" L"\0" L"\x0001d4a6" L"\0" + L"\x0001d4a9" L"\0" L"\x0001d4aa" L"\0" L"\x0001d4ab" L"\0" L"\x0001d4ac" + L"\0" L"\x0001d4ae" L"\0" L"\x0001d4af" L"\0" L"\x0001d4b0" L"\0" + L"\x0001d4b1" L"\0" L"\x0001d4b2" L"\0" L"\x0001d4b3" L"\0" L"\x0001d4b4" + L"\0" L"\x0001d4b5" L"\0" L"\x0001d4b6" L"\0" L"\x0001d4b7" L"\0" + L"\x0001d4b8" L"\0" L"\x0001d4b9" L"\0" L"\x0001d4bb" L"\0" L"\x0001d4bd" + L"\0" L"\x0001d4be" L"\0" L"\x0001d4bf" L"\0" L"\x0001d4c0" L"\0" + L"\x0001d4c2" L"\0" L"\x0001d4c3" L"\0" L"\x0001d4c5" L"\0" L"\x0001d4c6" + L"\0" L"\x0001d4c7" L"\0" L"\x0001d4c8" L"\0" L"\x0001d4c9" L"\0" + L"\x0001d4ca" L"\0" L"\x0001d4cb" L"\0" L"\x0001d4cc" L"\0" L"\x0001d4cd" + L"\0" L"\x0001d4ce" L"\0" L"\x0001d4cf" L"\0" L"\x0001d4d0" L"\0" + L"\x0001d4d1" L"\0" L"\x0001d4d2" L"\0" L"\x0001d4d3" L"\0" L"\x0001d4d4" + L"\0" L"\x0001d4d5" L"\0" L"\x0001d4d6" L"\0" L"\x0001d4d7" L"\0" + L"\x0001d4d8" L"\0" L"\x0001d4d9" L"\0" L"\x0001d4da" L"\0" L"\x0001d4db" + L"\0" L"\x0001d4dc" L"\0" L"\x0001d4dd" L"\0" L"\x0001d4de" L"\0" + L"\x0001d4df" L"\0" L"\x0001d4e0" L"\0" L"\x0001d4e1" L"\0" L"\x0001d4e2" + L"\0" L"\x0001d4e3" L"\0" L"\x0001d4e4" L"\0" L"\x0001d4e5" L"\0" + L"\x0001d4e6" L"\0" L"\x0001d4e7" L"\0" L"\x0001d4e8" L"\0" L"\x0001d4e9" + L"\0" L"\x0001d4ea" L"\0" L"\x0001d4eb" L"\0" L"\x0001d4ec" L"\0" + L"\x0001d4ed" L"\0" L"\x0001d4ee" L"\0" L"\x0001d4ef" L"\0" L"\x0001d4f0" + L"\0" L"\x0001d4f1" L"\0" L"\x0001d4f2" L"\0" L"\x0001d4f3" L"\0" + L"\x0001d4f4" L"\0" L"\x0001d4f5" L"\0" L"\x0001d4f6" L"\0" L"\x0001d4f7" + L"\0" L"\x0001d4f8" L"\0" L"\x0001d4f9" L"\0" L"\x0001d4fa" L"\0" + L"\x0001d4fb" L"\0" L"\x0001d4fc" L"\0" L"\x0001d4fd" L"\0" L"\x0001d4fe" + L"\0" L"\x0001d4ff" L"\0" L"\x0001d500" L"\0" L"\x0001d501" L"\0" + L"\x0001d502" L"\0" L"\x0001d503" L"\0" L"\x0001d504" L"\0" L"\x0001d505" + L"\0" L"\x0001d507" L"\0" L"\x0001d508" L"\0" L"\x0001d509" L"\0" + L"\x0001d50a" L"\0" L"\x0001d50d" L"\0" L"\x0001d50e" L"\0" L"\x0001d50f" + L"\0" L"\x0001d510" L"\0" L"\x0001d511" L"\0" L"\x0001d512" L"\0" + L"\x0001d513" L"\0" L"\x0001d514" L"\0" L"\x0001d516" L"\0" L"\x0001d517" + L"\0" L"\x0001d518" L"\0" L"\x0001d519" L"\0" L"\x0001d51a" L"\0" + L"\x0001d51b" L"\0" L"\x0001d51c" L"\0" L"\x0001d51e" L"\0" L"\x0001d51f" + L"\0" L"\x0001d520" L"\0" L"\x0001d521" L"\0" L"\x0001d522" L"\0" + L"\x0001d523" L"\0" L"\x0001d524" L"\0" L"\x0001d525" L"\0" L"\x0001d526" + L"\0" L"\x0001d527" L"\0" L"\x0001d528" L"\0" L"\x0001d529" L"\0" + L"\x0001d52a" L"\0" L"\x0001d52b" L"\0" L"\x0001d52c" L"\0" L"\x0001d52d" + L"\0" L"\x0001d52e" L"\0" L"\x0001d52f" L"\0" L"\x0001d530" L"\0" + L"\x0001d531" L"\0" L"\x0001d532" L"\0" L"\x0001d533" L"\0" L"\x0001d534" + L"\0" L"\x0001d535" L"\0" L"\x0001d536" L"\0" L"\x0001d537" L"\0" + L"\x0001d538" L"\0" L"\x0001d539" L"\0" L"\x0001d53b" L"\0" L"\x0001d53c" + L"\0" L"\x0001d53d" L"\0" L"\x0001d53e" L"\0" L"\x0001d540" L"\0" + L"\x0001d541" L"\0" L"\x0001d542" L"\0" L"\x0001d543" L"\0" L"\x0001d544" + L"\0" L"\x0001d546" L"\0" L"\x0001d54a" L"\0" L"\x0001d54b" L"\0" + L"\x0001d54c" L"\0" L"\x0001d54d" L"\0" L"\x0001d54e" L"\0" L"\x0001d54f" + L"\0" L"\x0001d550" L"\0" L"\x0001d552" L"\0" L"\x0001d553" L"\0" + L"\x0001d554" L"\0" L"\x0001d555" L"\0" L"\x0001d556" L"\0" L"\x0001d557" + L"\0" L"\x0001d558" L"\0" L"\x0001d559" L"\0" L"\x0001d55a" L"\0" + L"\x0001d55b" L"\0" L"\x0001d55c" L"\0" L"\x0001d55d" L"\0" L"\x0001d55e" + L"\0" L"\x0001d55f" L"\0" L"\x0001d560" L"\0" L"\x0001d561" L"\0" + L"\x0001d562" L"\0" L"\x0001d563" L"\0" L"\x0001d564" L"\0" L"\x0001d565" + L"\0" L"\x0001d566" L"\0" L"\x0001d567" L"\0" L"\x0001d568" L"\0" + L"\x0001d569" L"\0" L"\x0001d56a" L"\0" L"\x0001d56b" L"\0" L"\x0001d56c" + L"\0" L"\x0001d56d" L"\0" L"\x0001d56e" L"\0" L"\x0001d56f" L"\0" + L"\x0001d570" L"\0" L"\x0001d571" L"\0" L"\x0001d572" L"\0" L"\x0001d573" + L"\0" L"\x0001d574" L"\0" L"\x0001d575" L"\0" L"\x0001d576" L"\0" + L"\x0001d577" L"\0" L"\x0001d578" L"\0" L"\x0001d579" L"\0" L"\x0001d57a" + L"\0" L"\x0001d57b" L"\0" L"\x0001d57c" L"\0" L"\x0001d57d" L"\0" + L"\x0001d57e" L"\0" L"\x0001d57f" L"\0" L"\x0001d580" L"\0" L"\x0001d581" + L"\0" L"\x0001d582" L"\0" L"\x0001d583" L"\0" L"\x0001d584" L"\0" + L"\x0001d585" L"\0" L"\x0001d586" L"\0" L"\x0001d587" L"\0" L"\x0001d588" + L"\0" L"\x0001d589" L"\0" L"\x0001d58a" L"\0" L"\x0001d58b" L"\0" + L"\x0001d58c" L"\0" L"\x0001d58d" L"\0" L"\x0001d58e" L"\0" L"\x0001d58f" + L"\0" L"\x0001d590" L"\0" L"\x0001d591" L"\0" L"\x0001d592" L"\0" + L"\x0001d593" L"\0" L"\x0001d594" L"\0" L"\x0001d595" L"\0" L"\x0001d596" + L"\0" L"\x0001d597" L"\0" L"\x0001d598" L"\0" L"\x0001d599" L"\0" + L"\x0001d59a" L"\0" L"\x0001d59b" L"\0" L"\x0001d59c" L"\0" L"\x0001d59d" + L"\0" L"\x0001d59e" L"\0" L"\x0001d59f" L"\0" L"\x0001d5a0" L"\0" + L"\x0001d5a1" L"\0" L"\x0001d5a2" L"\0" L"\x0001d5a3" L"\0" L"\x0001d5a4" + L"\0" L"\x0001d5a5" L"\0" L"\x0001d5a6" L"\0" L"\x0001d5a7" L"\0" + L"\x0001d5a8" L"\0" L"\x0001d5a9" L"\0" L"\x0001d5aa" L"\0" L"\x0001d5ab" + L"\0" L"\x0001d5ac" L"\0" L"\x0001d5ad" L"\0" L"\x0001d5ae" L"\0" + L"\x0001d5af" L"\0" L"\x0001d5b0" L"\0" L"\x0001d5b1" L"\0" L"\x0001d5b2" + L"\0" L"\x0001d5b3" L"\0" L"\x0001d5b4" L"\0" L"\x0001d5b5" L"\0" + L"\x0001d5b6" L"\0" L"\x0001d5b7" L"\0" L"\x0001d5b8" L"\0" L"\x0001d5b9" + L"\0" L"\x0001d5ba" L"\0" L"\x0001d5bb" L"\0" L"\x0001d5bc" L"\0" + L"\x0001d5bd" L"\0" L"\x0001d5be" L"\0" L"\x0001d5bf" L"\0" L"\x0001d5c0" + L"\0" L"\x0001d5c1" L"\0" L"\x0001d5c2" L"\0" L"\x0001d5c3" L"\0" + L"\x0001d5c4" L"\0" L"\x0001d5c5" L"\0" L"\x0001d5c6" L"\0" L"\x0001d5c7" + L"\0" L"\x0001d5c8" L"\0" L"\x0001d5c9" L"\0" L"\x0001d5ca" L"\0" + L"\x0001d5cb" L"\0" L"\x0001d5cc" L"\0" L"\x0001d5cd" L"\0" L"\x0001d5ce" + L"\0" L"\x0001d5cf" L"\0" L"\x0001d5d0" L"\0" L"\x0001d5d1" L"\0" + L"\x0001d5d2" L"\0" L"\x0001d5d3" L"\0" L"\x0001d5d4" L"\0" L"\x0001d5d5" + L"\0" L"\x0001d5d6" L"\0" L"\x0001d5d7" L"\0" L"\x0001d5d8" L"\0" + L"\x0001d5d9" L"\0" L"\x0001d5da" L"\0" L"\x0001d5db" L"\0" L"\x0001d5dc" + L"\0" L"\x0001d5dd" L"\0" L"\x0001d5de" L"\0" L"\x0001d5df" L"\0" + L"\x0001d5e0" L"\0" L"\x0001d5e1" L"\0" L"\x0001d5e2" L"\0" L"\x0001d5e3" + L"\0" L"\x0001d5e4" L"\0" L"\x0001d5e5" L"\0" L"\x0001d5e6" L"\0" + L"\x0001d5e7" L"\0" L"\x0001d5e8" L"\0" L"\x0001d5e9" L"\0" L"\x0001d5ea" + L"\0" L"\x0001d5eb" L"\0" L"\x0001d5ec" L"\0" L"\x0001d5ed" L"\0" + L"\x0001d5ee" L"\0" L"\x0001d5ef" L"\0" L"\x0001d5f0" L"\0" L"\x0001d5f1" + L"\0" L"\x0001d5f2" L"\0" L"\x0001d5f3" L"\0" L"\x0001d5f4" L"\0" + L"\x0001d5f5" L"\0" L"\x0001d5f6" L"\0" L"\x0001d5f7" L"\0" L"\x0001d5f8" + L"\0" L"\x0001d5f9" L"\0" L"\x0001d5fa" L"\0" L"\x0001d5fb" L"\0" + L"\x0001d5fc" L"\0" L"\x0001d5fd" L"\0" L"\x0001d5fe" L"\0" L"\x0001d5ff" + L"\0" L"\x0001d600" L"\0" L"\x0001d601" L"\0" L"\x0001d602" L"\0" + L"\x0001d603" L"\0" L"\x0001d604" L"\0" L"\x0001d605" L"\0" L"\x0001d606" + L"\0" L"\x0001d607" L"\0" L"\x0001d608" L"\0" L"\x0001d609" L"\0" + L"\x0001d60a" L"\0" L"\x0001d60b" L"\0" L"\x0001d60c" L"\0" L"\x0001d60d" + L"\0" L"\x0001d60e" L"\0" L"\x0001d60f" L"\0" L"\x0001d610" L"\0" + L"\x0001d611" L"\0" L"\x0001d612" L"\0" L"\x0001d613" L"\0" L"\x0001d614" + L"\0" L"\x0001d615" L"\0" L"\x0001d616" L"\0" L"\x0001d617" L"\0" + L"\x0001d618" L"\0" L"\x0001d619" L"\0" L"\x0001d61a" L"\0" L"\x0001d61b" + L"\0" L"\x0001d61c" L"\0" L"\x0001d61d" L"\0" L"\x0001d61e" L"\0" + L"\x0001d61f" L"\0" L"\x0001d620" L"\0" L"\x0001d621" L"\0" L"\x0001d622" + L"\0" L"\x0001d623" L"\0" L"\x0001d624" L"\0" L"\x0001d625" L"\0" + L"\x0001d626" L"\0" L"\x0001d627" L"\0" L"\x0001d628" L"\0" L"\x0001d629" + L"\0" L"\x0001d62a" L"\0" L"\x0001d62b" L"\0" L"\x0001d62c" L"\0" + L"\x0001d62d" L"\0" L"\x0001d62e" L"\0" L"\x0001d62f" L"\0" L"\x0001d630" + L"\0" L"\x0001d631" L"\0" L"\x0001d632" L"\0" L"\x0001d633" L"\0" + L"\x0001d634" L"\0" L"\x0001d635" L"\0" L"\x0001d636" L"\0" L"\x0001d637" + L"\0" L"\x0001d638" L"\0" L"\x0001d639" L"\0" L"\x0001d63a" L"\0" + L"\x0001d63b" L"\0" L"\x0001d63c" L"\0" L"\x0001d63d" L"\0" L"\x0001d63e" + L"\0" L"\x0001d63f" L"\0" L"\x0001d640" L"\0" L"\x0001d641" L"\0" + L"\x0001d642" L"\0" L"\x0001d643" L"\0" L"\x0001d644" L"\0" L"\x0001d645" + L"\0" L"\x0001d646" L"\0" L"\x0001d647" L"\0" L"\x0001d648" L"\0" + L"\x0001d649" L"\0" L"\x0001d64a" L"\0" L"\x0001d64b" L"\0" L"\x0001d64c" + L"\0" L"\x0001d64d" L"\0" L"\x0001d64e" L"\0" L"\x0001d64f" L"\0" + L"\x0001d650" L"\0" L"\x0001d651" L"\0" L"\x0001d652" L"\0" L"\x0001d653" + L"\0" L"\x0001d654" L"\0" L"\x0001d655" L"\0" L"\x0001d656" L"\0" + L"\x0001d657" L"\0" L"\x0001d658" L"\0" L"\x0001d659" L"\0" L"\x0001d65a" + L"\0" L"\x0001d65b" L"\0" L"\x0001d65c" L"\0" L"\x0001d65d" L"\0" + L"\x0001d65e" L"\0" L"\x0001d65f" L"\0" L"\x0001d660" L"\0" L"\x0001d661" + L"\0" L"\x0001d662" L"\0" L"\x0001d663" L"\0" L"\x0001d664" L"\0" + L"\x0001d665" L"\0" L"\x0001d666" L"\0" L"\x0001d667" L"\0" L"\x0001d668" + L"\0" L"\x0001d669" L"\0" L"\x0001d66a" L"\0" L"\x0001d66b" L"\0" + L"\x0001d66c" L"\0" L"\x0001d66d" L"\0" L"\x0001d66e" L"\0" L"\x0001d66f" + L"\0" L"\x0001d670" L"\0" L"\x0001d671" L"\0" L"\x0001d672" L"\0" + L"\x0001d673" L"\0" L"\x0001d674" L"\0" L"\x0001d675" L"\0" L"\x0001d676" + L"\0" L"\x0001d677" L"\0" L"\x0001d678" L"\0" L"\x0001d679" L"\0" + L"\x0001d67a" L"\0" L"\x0001d67b" L"\0" L"\x0001d67c" L"\0" L"\x0001d67d" + L"\0" L"\x0001d67e" L"\0" L"\x0001d67f" L"\0" L"\x0001d680" L"\0" + L"\x0001d681" L"\0" L"\x0001d682" L"\0" L"\x0001d683" L"\0" L"\x0001d684" + L"\0" L"\x0001d685" L"\0" L"\x0001d686" L"\0" L"\x0001d687" L"\0" + L"\x0001d688" L"\0" L"\x0001d689" L"\0" L"\x0001d68a" L"\0" L"\x0001d68b" + L"\0" L"\x0001d68c" L"\0" L"\x0001d68d" L"\0" L"\x0001d68e" L"\0" + L"\x0001d68f" L"\0" L"\x0001d690" L"\0" L"\x0001d691" L"\0" L"\x0001d692" + L"\0" L"\x0001d693" L"\0" L"\x0001d694" L"\0" L"\x0001d695" L"\0" + L"\x0001d696" L"\0" L"\x0001d697" L"\0" L"\x0001d698" L"\0" L"\x0001d699" + L"\0" L"\x0001d69a" L"\0" L"\x0001d69b" L"\0" L"\x0001d69c" L"\0" + L"\x0001d69d" L"\0" L"\x0001d69e" L"\0" L"\x0001d69f" L"\0" L"\x0001d6a0" + L"\0" L"\x0001d6a1" L"\0" L"\x0001d6a2" L"\0" L"\x0001d6a3" L"\0" + L"\x0001d7ce" L"\0" L"\x0001d7cf" L"\0" L"\x0001d7d0" L"\0" L"\x0001d7d1" + L"\0" L"\x0001d7d2" L"\0" L"\x0001d7d3" L"\0" L"\x0001d7d4" L"\0" + L"\x0001d7d5" L"\0" L"\x0001d7d6" L"\0" L"\x0001d7d7" L"\0" L"\x0001d7d8" + L"\0" L"\x0001d7d9" L"\0" L"\x0001d7da" L"\0" L"\x0001d7db" L"\0" + L"\x0001d7dc" L"\0" L"\x0001d7dd" L"\0" L"\x0001d7de" L"\0" L"\x0001d7df" + L"\0" L"\x0001d7e0" L"\0" L"\x0001d7e1" L"\0" L"\x0001d7e2" L"\0" + L"\x0001d7e3" L"\0" L"\x0001d7e4" L"\0" L"\x0001d7e5" L"\0" L"\x0001d7e6" + L"\0" L"\x0001d7e7" L"\0" L"\x0001d7e8" L"\0" L"\x0001d7e9" L"\0" + L"\x0001d7ea" L"\0" L"\x0001d7eb" L"\0" L"\x0001d7ec" L"\0" L"\x0001d7ed" + L"\0" L"\x0001d7ee" L"\0" L"\x0001d7ef" L"\0" L"\x0001d7f0" L"\0" + L"\x0001d7f1" L"\0" L"\x0001d7f2" L"\0" L"\x0001d7f3" L"\0" L"\x0001d7f4" + L"\0" L"\x0001d7f5" L"\0" L"\x0001d7f6" L"\0" L"\x0001d7f7" L"\0" + L"\x0001d7f8" L"\0" L"\x0001d7f9" L"\0" L"\x0001d7fa" L"\0" L"\x0001d7fb" + L"\0" L"\x0001d7fc" L"\0" L"\x0001d7fd" L"\0" L"\x0001d7fe" L"\0" + L"\x0001d7ff"; static const uint32_t translit_to_idx[] = { 0, 3, 8, 12, 15, 20, 23, 26, 30, 37, 44, 51, @@ -469,47 +470,47 @@ static const uint32_t translit_to_idx[] 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, 180, 183, 186, 189, 192, 196, 199, 202, 205, 208, 211, 214, 217, 221, 224, 227, 230, 233, 237, 242, 245, 248, 252, 257, - 260, 263, 267, 271, 275, 279, 282, 284, 286, 288, 290, 294, - 299, 304, 309, 312, 317, 322, 325, 328, 331, 334, 337, 340, - 343, 346, 349, 352, 356, 359, 362, 365, 368, 371, 376, 382, - 385, 390, 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, - 423, 426, 429, 432, 435, 442, 449, 456, 463, 470, 477, 484, - 491, 498, 505, 512, 519, 524, 527, 531, 536, 540, 543, 547, - 552, 558, 562, 565, 569, 574, 577, 580, 583, 586, 589, 593, - 598, 602, 605, 609, 614, 620, 624, 627, 631, 636, 639, 642, - 645, 648, 652, 656, 661, 665, 669, 674, 677, 680, 683, 686, - 689, 692, 695, 699, 703, 707, 711, 716, 721, 726, 731, 736, - 741, 746, 751, 756, 761, 765, 769, 773, 777, 781, 785, 789, - 793, 798, 803, 808, 813, 818, 823, 828, 833, 838, 842, 847, - 852, 856, 860, 864, 868, 872, 877, 880, 884, 889, 894, 899, - 904, 909, 914, 919, 924, 929, 935, 941, 947, 953, 959, 965, - 971, 977, 983, 989, 995, 1000, 1005, 1010, 1015, 1020, 1025, 1030, - 1035, 1040, 1046, 1052, 1058, 1064, 1070, 1076, 1082, 1088, 1094, 1100, - 1106, 1110, 1114, 1118, 1122, 1126, 1130, 1134, 1138, 1142, 1147, 1152, - 1157, 1162, 1167, 1172, 1177, 1182, 1187, 1192, 1197, 1202, 1207, 1212, - 1217, 1222, 1227, 1232, 1237, 1242, 1247, 1252, 1257, 1262, 1267, 1272, - 1277, 1282, 1287, 1292, 1297, 1302, 1307, 1312, 1317, 1322, 1327, 1332, - 1337, 1342, 1347, 1352, 1357, 1362, 1367, 1372, 1377, 1382, 1387, 1392, - 1397, 1402, 1407, 1412, 1417, 1422, 1427, 1432, 1437, 1442, 1447, 1452, - 1457, 1462, 1467, 1472, 1477, 1482, 1487, 1492, 1497, 1502, 1507, 1512, - 1517, 1522, 1527, 1532, 1537, 1542, 1547, 1552, 1557, 1562, 1567, 1572, - 1577, 1582, 1587, 1592, 1595, 1598, 1601, 1604, 1607, 1610, 1613, 1616, - 1619, 1622, 1625, 1628, 1633, 1637, 1642, 1645, 1648, 1654, 1660, 1666, - 1672, 1678, 1684, 1690, 1696, 1702, 1708, 1714, 1720, 1726, 1732, 1738, - 1744, 1750, 1756, 1762, 1768, 1774, 1780, 1786, 1792, 1798, 1804, 1810, - 1816, 1822, 1828, 1833, 1837, 1841, 1846, 1850, 1854, 1858, 1862, 1866, - 1870, 1874, 1878, 1882, 1886, 1891, 1897, 1901, 1905, 1909, 1913, 1917, - 1921, 1925, 1930, 1935, 1940, 1945, 1949, 1953, 1957, 1961, 1965, 1969, - 1973, 1977, 1981, 1985, 1991, 1997, 2002, 2008, 2014, 2020, 2025, 2031, - 2036, 2043, 2047, 2052, 2057, 2062, 2067, 2074, 2083, 2087, 2091, 2095, - 2099, 2103, 2107, 2111, 2115, 2119, 2123, 2127, 2131, 2135, 2139, 2143, - 2147, 2153, 2157, 2161, 2165, 2171, 2176, 2180, 2184, 2188, 2192, 2196, - 2200, 2204, 2208, 2212, 2216, 2221, 2225, 2229, 2234, 2239, 2243, 2249, - 2254, 2258, 2262, 2266, 2270, 2274, 2278, 2282, 2287, 2292, 2296, 2299, - 2301, 2303, 2305, 2307, 2309, 2311, 2313, 2315, 2317, 2319, 2321, 2323, - 2325, 2327, 2329, 2331, 2334, 2337, 2340, 2343, 2346, 2349, 2352, 2355, + 260, 263, 267, 270, 274, 278, 282, 285, 287, 289, 291, 293, + 297, 302, 307, 312, 315, 320, 325, 328, 331, 334, 337, 340, + 343, 346, 349, 352, 355, 359, 362, 365, 368, 371, 374, 379, + 385, 388, 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, + 423, 426, 429, 432, 435, 438, 445, 452, 459, 466, 473, 480, + 487, 494, 501, 508, 515, 522, 527, 530, 534, 539, 543, 546, + 550, 555, 561, 565, 568, 572, 577, 580, 583, 586, 589, 592, + 596, 601, 605, 608, 612, 617, 623, 627, 630, 634, 639, 642, + 645, 648, 651, 655, 659, 664, 668, 672, 677, 680, 683, 686, + 689, 692, 695, 698, 702, 706, 710, 714, 719, 724, 729, 734, + 739, 744, 749, 754, 759, 764, 768, 772, 776, 780, 784, 788, + 792, 796, 801, 806, 811, 816, 821, 826, 831, 836, 841, 845, + 850, 855, 859, 863, 867, 871, 875, 880, 883, 887, 892, 897, + 902, 907, 912, 917, 922, 927, 932, 938, 944, 950, 956, 962, + 968, 974, 980, 986, 992, 998, 1003, 1008, 1013, 1018, 1023, 1028, + 1033, 1038, 1043, 1049, 1055, 1061, 1067, 1073, 1079, 1085, 1091, 1097, + 1103, 1109, 1113, 1117, 1121, 1125, 1129, 1133, 1137, 1141, 1145, 1150, + 1155, 1160, 1165, 1170, 1175, 1180, 1185, 1190, 1195, 1200, 1205, 1210, + 1215, 1220, 1225, 1230, 1235, 1240, 1245, 1250, 1255, 1260, 1265, 1270, + 1275, 1280, 1285, 1290, 1295, 1300, 1305, 1310, 1315, 1320, 1325, 1330, + 1335, 1340, 1345, 1350, 1355, 1360, 1365, 1370, 1375, 1380, 1385, 1390, + 1395, 1400, 1405, 1410, 1415, 1420, 1425, 1430, 1435, 1440, 1445, 1450, + 1455, 1460, 1465, 1470, 1475, 1480, 1485, 1490, 1495, 1500, 1505, 1510, + 1515, 1520, 1525, 1530, 1535, 1540, 1545, 1550, 1555, 1560, 1565, 1570, + 1575, 1580, 1585, 1590, 1595, 1598, 1601, 1604, 1607, 1610, 1613, 1616, + 1619, 1622, 1625, 1628, 1631, 1636, 1640, 1645, 1648, 1651, 1657, 1663, + 1669, 1675, 1681, 1687, 1693, 1699, 1705, 1711, 1717, 1723, 1729, 1735, + 1741, 1747, 1753, 1759, 1765, 1771, 1777, 1783, 1789, 1795, 1801, 1807, + 1813, 1819, 1825, 1831, 1836, 1840, 1844, 1849, 1853, 1857, 1861, 1865, + 1869, 1873, 1877, 1881, 1885, 1889, 1894, 1900, 1904, 1908, 1912, 1916, + 1920, 1924, 1928, 1933, 1938, 1943, 1948, 1952, 1956, 1960, 1964, 1968, + 1972, 1976, 1980, 1984, 1988, 1994, 2000, 2005, 2011, 2017, 2023, 2028, + 2034, 2039, 2046, 2050, 2055, 2060, 2065, 2070, 2077, 2086, 2090, 2094, + 2098, 2102, 2106, 2110, 2114, 2118, 2122, 2126, 2130, 2134, 2138, 2142, + 2146, 2150, 2156, 2160, 2164, 2168, 2174, 2179, 2183, 2187, 2191, 2195, + 2199, 2203, 2207, 2211, 2215, 2219, 2224, 2228, 2232, 2237, 2242, 2246, + 2252, 2257, 2261, 2265, 2269, 2273, 2277, 2281, 2285, 2290, 2295, 2299, + 2302, 2304, 2306, 2308, 2310, 2312, 2314, 2316, 2318, 2320, 2322, 2324, + 2326, 2328, 2330, 2332, 2334, 2337, 2340, 2343, 2346, 2349, 2352, 2355, 2358, 2361, 2364, 2367, 2370, 2373, 2376, 2379, 2382, 2385, 2388, 2391, - 2394, 2397, 2400, 2403, 2406, 2408, 2411, 2414, 2417, 2420, 2423, 2426, + 2394, 2397, 2400, 2403, 2406, 2409, 2411, 2414, 2417, 2420, 2423, 2426, 2429, 2432, 2435, 2438, 2441, 2444, 2447, 2450, 2453, 2456, 2459, 2462, 2465, 2468, 2471, 2474, 2477, 2480, 2483, 2486, 2489, 2492, 2495, 2498, 2501, 2504, 2507, 2510, 2513, 2516, 2519, 2522, 2525, 2528, 2531, 2534, @@ -575,7 +576,7 @@ static const uint32_t translit_to_idx[] 4661, 4664, 4667, 4670, 4673, 4676, 4679, 4682, 4685, 4688, 4691, 4694, 4697, 4700, 4703, 4706, 4709, 4712, 4715, 4718, 4721, 4724, 4727, 4730, 4733, 4736, 4739, 4742, 4745, 4748, 4751, 4754, 4757, 4760, 4763, 4766, - 4769, 4772, 4775, 4778, 4781, 4784, 4787, 4790 + 4769, 4772, 4775, 4778, 4781, 4784, 4787, 4790, 4793 }; static const wchar_t translit_to_tbl[] = L" \0" L"\0" L"(C)\0" L"\0" L"<<\0" L"\0" L"-\0" L"\0" L"(R)\0" L"\0" L"u\0" @@ -591,13 +592,13 @@ static const wchar_t translit_to_tbl[] = L"\0" L"'\0" L"\0" L"'\0" L"\0" L",\0" L"\0" L"'\0" L"\0" L"\"\0" L"\0" L"\"\0" L"\0" L",,\0" L"\0" L"\"\0" L"\0" L"+\0" L"\0" L"o\0" L"\0" L".\0" L"\0" L"..\0" L"\0" L"...\0" L"\0" L" \0" L"\0" L"`\0" L"\0" L"``\0" L"\0" - L"```\0" L"\0" L"<\0" L"\0" L">\0" L"\0" L"!!\0" L"\0" L"??\0" L"\0" L"?!\0" - L"\0" L"!?\0" L"\0" L" \0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" - L"\0" L"Rs\0" L"\0" L"EUR\0" L"\0" L"a/c\0" L"\0" L"a/s\0" L"\0" L"C\0" - L"\0" L"c/o\0" L"\0" L"c/u\0" L"\0" L"g\0" L"\0" L"H\0" L"\0" L"H\0" L"\0" - L"H\0" L"\0" L"h\0" L"\0" L"I\0" L"\0" L"I\0" L"\0" L"L\0" L"\0" L"l\0" - L"\0" L"N\0" L"\0" L"No\0" L"\0" L"P\0" L"\0" L"Q\0" L"\0" L"R\0" L"\0" - L"R\0" L"\0" L"R\0" L"\0" L"TEL\0" L"\0" L"(TM)\0" L"\0" L"Z\0" L"\0" + L"```\0" L"\0" L"<\0" L"\0" L">\0" L"\0" L"!!\0" L"\0" L"/\0" L"\0" L"??\0" + L"\0" L"?!\0" L"\0" L"!?\0" L"\0" L" \0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" + L"\0" L"\0" L"\0" L"Rs\0" L"\0" L"EUR\0" L"\0" L"a/c\0" L"\0" L"a/s\0" L"\0" + L"C\0" L"\0" L"c/o\0" L"\0" L"c/u\0" L"\0" L"g\0" L"\0" L"H\0" L"\0" L"H\0" + L"\0" L"H\0" L"\0" L"h\0" L"\0" L"I\0" L"\0" L"I\0" L"\0" L"L\0" L"\0" + L"l\0" L"\0" L"N\0" L"\0" L"No\0" L"\0" L"P\0" L"\0" L"Q\0" L"\0" L"R\0" + L"\0" L"R\0" L"\0" L"R\0" L"\0" L"TEL\0" L"\0" L"(TM)\0" L"\0" L"Z\0" L"\0" L"Ohm\0" L"\0" L"Z\0" L"\0" L"B\0" L"\0" L"C\0" L"\0" L"e\0" L"\0" L"e\0" L"\0" L"E\0" L"\0" L"F\0" L"\0" L"M\0" L"\0" L"o\0" L"\0" L"i\0" L"\0" L"D\0" L"\0" L"d\0" L"\0" L"e\0" L"\0" L"i\0" L"\0" L"j\0" L"\0" L" 1/3 \0" diff -pNur -x CVS -x libidn glibc-2.5/locale/C-translit.h.in glibc-2.5-branch/locale/C-translit.h.in --- glibc-2.5/locale/C-translit.h.in 2002-04-20 00:16:46.000000000 -0700 +++ glibc-2.5-branch/locale/C-translit.h.in 2007-07-12 09:58:03.000000000 -0700 @@ -1,5 +1,5 @@ /* Transliteration for the C locale. -*-C-*- - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -94,6 +94,7 @@ "\x2039" "<" /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */ "\x203a" ">" /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */ "\x203c" "!!" /* DOUBLE EXCLAMATION MARK */ +"\x2044" "/" /* FRACTION SLASH */ "\x2047" "??" /* DOUBLE QUESTION MARK */ "\x2048" "?!" /* QUESTION EXCLAMATION MARK */ "\x2049" "!?" /* EXCLAMATION QUESTION MARK */ diff -pNur -x CVS -x libidn glibc-2.5/locale/iso-3166.def glibc-2.5-branch/locale/iso-3166.def --- glibc-2.5/locale/iso-3166.def 2006-09-29 11:07:50.000000000 -0700 +++ glibc-2.5-branch/locale/iso-3166.def 2007-07-12 07:54:28.000000000 -0700 @@ -198,6 +198,7 @@ DEFINE_COUNTRY_CODE ("SAO TOME AND PRINC DEFINE_COUNTRY_CODE ("SAUDI ARABIA", SA, SAU, 682) DEFINE_COUNTRY_CODE ("SENEGAL", SN, SEN, 686) DEFINE_COUNTRY_CODE ("SERBIA AND MONTENEGRO", CS, SCG, 891) +DEFINE_COUNTRY_CODE ("SERBIA", RS, SRB, 688) DEFINE_COUNTRY_CODE ("SEYCHELLES", SC, SYC, 690) DEFINE_COUNTRY_CODE ("SIERRA LEONE", SL, SLE, 694) DEFINE_COUNTRY_CODE ("SINGAPORE", SG, SGP, 702) diff -pNur -x CVS -x libidn glibc-2.5/locale/iso-4217.def glibc-2.5-branch/locale/iso-4217.def --- glibc-2.5/locale/iso-4217.def 2006-04-26 00:14:53.000000000 -0700 +++ glibc-2.5-branch/locale/iso-4217.def 2007-07-12 07:54:28.000000000 -0700 @@ -129,6 +129,7 @@ DEFINE_INT_CURR("PYG") /* Paraguay Guar DEFINE_INT_CURR("QAR") /* Qatar Rial */ DEFINE_INT_CURR("ROL") /* Romanian Leu */ DEFINE_INT_CURR("RON") /* Romanian New Leu */ +DEFINE_INT_CURR("RSD") /* Serbian Dinars */ DEFINE_INT_CURR("RUB") /* Russian Ruble */ DEFINE_INT_CURR("RWF") /* Rwanda Franc */ DEFINE_INT_CURR("SAR") /* Saudi Arabia Riyal */ diff -pNur -x CVS -x libidn glibc-2.5/locale/programs/ld-ctype.c glibc-2.5-branch/locale/programs/ld-ctype.c --- glibc-2.5/locale/programs/ld-ctype.c 2006-09-20 20:57:30.000000000 -0700 +++ glibc-2.5-branch/locale/programs/ld-ctype.c 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -1866,6 +1866,9 @@ find_translit (struct localedef_t *local assert (locale != NULL); ctype = locale->categories[LC_CTYPE].ctype; + if (ctype == NULL) + return NULL; + if (ctype->translit != NULL) result = find_translit2 (ctype, charmap, wch); diff -pNur -x CVS -x libidn glibc-2.5/localedata/ChangeLog glibc-2.5-branch/localedata/ChangeLog --- glibc-2.5/localedata/ChangeLog 2006-09-29 11:30:52.000000000 -0700 +++ glibc-2.5-branch/localedata/ChangeLog 2007-07-12 08:22:08.000000000 -0700 @@ -1,3 +1,84 @@ +2007-05-07 Ulrich Drepper + + * locales/as_IN: Fix currency_symbol, abday for Sunday, abmon for + January, February, and September to December, mon for January, + February, September, and December, am_pm, and name_*. + Patch by Amitakhya Phukan . + +2007-04-27 Ulrich Drepper + + [BZ #3213] + * locales/translit_neutral: Add entry for U2044. + +2007-04-24 Ulrich Drepper + + [BZ #4411] + * locales/en_ZA: Update int_select. + Patch by Dwayne Bailey . + +2007-02-16 Ulrich Drepper + + [BZ #3995] + * locales/ru_RU (LC_TIME): Set first_weekday and first_workday. + +2007-02-16 Ulrich Drepper + + [BZ #3851] + * locales/bn_BD: Fix full name of January and February. + Patch by Jamil Ahmed . + +2007-02-17 Ulrich Drepper + + [BZ #3334] + * locales/sr_ME: Update from maintainer. + +2007-02-16 Ulrich Drepper + + [BZ #3322] + * SUPPORTED (SUPPORTED-LOCALES): Add sr_RS and sr_RS@latin. + * locales/sr_RS: New file. + * locales/sr_RS@latin: New file. + +2007-02-02 Bruno Haible + + * charmaps/EUC-KR: Add mapping for 0xA2 0xE8. + * charmaps/JOHAB: Add mapping for 0xD9 0xE8. + Reported by Jungshik Shin . + + * charmaps/JOHAB: Add mappings for 0xD9 0xE6 and 0xD9 0xE7. + Reported by Jungshik Shin . + +2007-01-12 Gwenole Beauchesne + + [BZ #3884] + * locales/sl_SI: Slovenia joined the Euro zone. + Fix negative number format. + +2006-11-02 Ulrich Drepper + + * locales/mai_IN: New file. + Provided by Rajesh Ranjan . + + * SUPPORTED: Add mai_IN/UTF-8. + +2006-10-12 Ulrich Drepper + + [BZ #3320] + * locales/es_ES (LC_TIME): Add week, first_weekday, and first_workday. + +2006-10-05 Dmitry V. Levin + + * locales/tt_RU: Fix territory, title and descriptive comment. + +2006-10-05 Ulrich Drepper + + * locales/pa_IN (abday): Fix spelling of Sunday. + Patch by Mayank Jain . + +2006-10-01 Ulrich Drepper + + * locales/en_GB: Use more complete en_US data in LC_NAME. + 2006-09-29 Ulrich Drepper [BZ #39] diff -pNur -x CVS -x libidn glibc-2.5/localedata/charmaps/EUC-KR glibc-2.5-branch/localedata/charmaps/EUC-KR --- glibc-2.5/localedata/charmaps/EUC-KR 2002-11-02 17:21:08.000000000 -0800 +++ glibc-2.5-branch/localedata/charmaps/EUC-KR 2007-07-12 07:48:20.000000000 -0700 @@ -341,6 +341,7 @@ CHARMAP /xa2/xe5 TELEPHONE SIGN /xa2/xe6 EURO SIGN /xa2/xe7 REGISTERED SIGN + /xa2/xe8 CIRCLED HANGUL IEUNG U /xa3/xa1 FULLWIDTH EXCLAMATION MARK /xa3/xa2 FULLWIDTH QUOTATION MARK /xa3/xa3 FULLWIDTH NUMBER SIGN diff -pNur -x CVS -x libidn glibc-2.5/localedata/charmaps/JOHAB glibc-2.5-branch/localedata/charmaps/JOHAB --- glibc-2.5/localedata/charmaps/JOHAB 2002-11-02 17:21:08.000000000 -0800 +++ glibc-2.5-branch/localedata/charmaps/JOHAB 2007-07-12 07:48:20.000000000 -0700 @@ -11520,6 +11520,9 @@ CHARMAP /xd9/xe3 SQUARE AM /xd9/xe4 SQUARE PM /xd9/xe5 TELEPHONE SIGN + /xd9/xe6 EURO SIGN + /xd9/xe7 REGISTERED SIGN + /xd9/xe8 CIRCLED HANGUL IEUNG U /xda/x31 FULLWIDTH EXCLAMATION MARK /xda/x32 FULLWIDTH QUOTATION MARK /xda/x33 FULLWIDTH NUMBER SIGN diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/as_IN glibc-2.5-branch/localedata/locales/as_IN --- glibc-2.5/localedata/locales/as_IN 2006-07-30 15:19:44.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/as_IN 2007-07-12 08:22:08.000000000 -0700 @@ -610,7 +610,7 @@ END LC_NUMERIC %%%%%%%%%%%%% LC_MONETARY int_curr_symbol "" -currency_symbol "" +currency_symbol "" mon_decimal_point "" mon_thousands_sep "" mon_grouping 3;2 @@ -634,7 +634,7 @@ END LC_MONETARY %%%%%%%%%%%%% LC_TIME -abday "";/ +abday "";/ "";/ "";/ "";/ @@ -648,37 +648,37 @@ day "";/ "";/ "" -abmon "";/ - "";/ +abmon "";/ + "";/ "";/ "";/ "";/ "";/ "";/ "";/ - "";/ - "";/ - "";/ - "" -mon "";/ - "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ "";/ "";/ "";/ "";/ "";/ "";/ - "";/ + "";/ "";/ "";/ - "" + "" % d_fmt "%e-%m-%Y" d_fmt "" % t_fmt "%I.%M.%S %p" t_fmt "" % d_t_fmt"%e %B, %Y %I.%M.%S %p %Z" d_t_fmt "" -am_pm "";"" +am_pm "";"" % t_fmt_ampm "%I.%M.%S %p" t_fmt_ampm "" END LC_TIME @@ -704,10 +704,10 @@ LC_NAME name_fmt "/ " name_gen "" -name_mr "" -name_mrs "" -name_miss "" -name_ms "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" END LC_NAME %%%%%%%%%%%%% diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/bn_BD glibc-2.5-branch/localedata/locales/bn_BD --- glibc-2.5/localedata/locales/bn_BD 2006-08-23 23:39:08.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/bn_BD 2007-07-12 07:54:59.000000000 -0700 @@ -13,8 +13,8 @@ tel "" fax "" language "Bengali/Bangla" territory "Bangladesh" -revision "0.3" -date "2005-01-18" +revision "0.5" +date "2007-01-10" category "bn_BD:2001";LC_IDENTIFICATION category "bn_BD:2001";LC_COLLATE @@ -101,8 +101,8 @@ abmon "";/ "" -mon "";/ - "";/ +mon "";/ + "";/ "";/ "";/ "";/ diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/en_GB glibc-2.5-branch/localedata/locales/en_GB --- glibc-2.5/localedata/locales/en_GB 2006-07-30 15:19:44.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/en_GB 2006-10-01 09:18:33.000000000 -0700 @@ -146,8 +146,7 @@ measurement 1 END LC_MEASUREMENT LC_NAME -name_fmt "/ -" +copy "en_US" END LC_NAME LC_ADDRESS diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/en_ZA glibc-2.5-branch/localedata/locales/en_ZA --- glibc-2.5/localedata/locales/en_ZA 2006-07-30 15:19:44.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/en_ZA 2007-07-12 08:11:14.000000000 -0700 @@ -8,8 +8,8 @@ comment_char % % Fax: +27 12 3430389 % Language: en % Territory: ZA -% Revision: 1.2.1 -% Date: 2005-10-13 +% Revision: 1.3 +% Date: 2007-04-19 % Users: general % Repertoiremap: mnemonic,ds % Charset: ISO-8859-1 @@ -17,6 +17,9 @@ comment_char % % for commercial purposes. % % Changelog +% 1.3 (2007-04-19): +% 2007-04-19 Dwayne Bailey +% - Change int_select from 09 to 00 % 1.2.1 (2005-10-13): % 2005-10-12 Dwayne Bailey % - Update contact information @@ -55,8 +58,8 @@ territory "South Africa" % audience "" % application "" abbreviation "Translate.org.za" -revision "1.2.1" -date "2005-10-13" +revision "1.3" +date "2007-04-19" % category "en_ZA:2003";LC_IDENTIFICATION category "en_ZA:2000";LC_CTYPE @@ -235,8 +238,8 @@ tel_int_fmt "" % Prefix for making international calls -% "09" -int_select "" +% "00" +int_select "" % International dialing code % "27" diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/es_ES glibc-2.5-branch/localedata/locales/es_ES --- glibc-2.5/localedata/locales/es_ES 2006-07-30 15:19:44.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/es_ES 2007-01-12 06:59:44.000000000 -0800 @@ -2187,12 +2187,13 @@ t_fmt_ampm "" date_fmt "/ / " +week 7;19971130;5 +first_weekday 2 +first_workday 2 END LC_TIME LC_PAPER -% FIXME height 297 -% FIXME width 210 END LC_PAPER diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/mai_IN glibc-2.5-branch/localedata/locales/mai_IN --- glibc-2.5/localedata/locales/mai_IN 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/localedata/locales/mai_IN 2007-01-12 07:26:50.000000000 -0800 @@ -0,0 +1,84 @@ +comment_char % +escape_char / +% Maithili language locale for India. +% Contributed by Rajesh Ranjan and +% Sangeeta Kumari . + +LC_IDENTIFICATION +title "Maithili language locale for India" +source "Maithili Computing Research Center, Pune, India" +address "B-3/302, Lunkad Daffodills, Viman Nagar, Pune, India" +contact "" +email "rajeshkajha@yahoo.com" +tel "" +fax "" +language "Maithili" +territory "India" +revision "1.0" +date "2006-11-01" +% +category "mai_IN:2006";LC_IDENTIFICATION +category "mai_IN:2006";LC_CTYPE +category "mai_IN:2006";LC_COLLATE +category "mai_IN:2006";LC_TIME +category "mai_IN:2006";LC_NUMERIC +category "mai_IN:2006";LC_MONETARY +category "mai_IN:2006";LC_MESSAGES +category "mai_IN:2006";LC_PAPER +category "mai_IN:2006";LC_NAME +category "mai_IN:2006";LC_ADDRESS +category "mai_IN:2006";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "hi_IN" +END LC_CTYPE + +LC_COLLATE +copy "hi_IN" +END LC_COLLATE + +LC_MONETARY +copy "hi_IN" +END LC_MONETARY + + +LC_NUMERIC +copy "hi_IN" +END LC_NUMERIC + + +LC_TIME +copy "hi_IN" +END LC_TIME + + +LC_MESSAGES +copy "hi_IN" +END LC_MESSAGES + + +LC_PAPER +copy "hi_IN" +END LC_PAPER + + +LC_NAME +copy "hi_IN" +END LC_NAME + + +LC_ADDRESS +copy "hi_IN" +END LC_ADDRESS + + +LC_TELEPHONE +copy "hi_IN" +END LC_TELEPHONE + + +LC_MEASUREMENT +copy "hi_IN" +END LC_MEASUREMENT diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/pa_IN glibc-2.5-branch/localedata/locales/pa_IN --- glibc-2.5/localedata/locales/pa_IN 2006-08-12 22:47:24.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/pa_IN 2006-10-05 09:54:26.000000000 -0700 @@ -80,7 +80,7 @@ abday "";/ "";/ "";/ "";/ - "" + "" % % Full weekday names (%A) day "";/ diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/ru_RU glibc-2.5-branch/localedata/locales/ru_RU --- glibc-2.5/localedata/locales/ru_RU 2006-07-30 15:19:43.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/ru_RU 2007-07-12 07:55:25.000000000 -0700 @@ -149,6 +149,8 @@ t_fmt_ampm "" date_fmt "/ / " +first_weekday 2 +first_workday 2 END LC_TIME LC_PAPER diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/sl_SI glibc-2.5-branch/localedata/locales/sl_SI --- glibc-2.5/localedata/locales/sl_SI 2006-07-30 15:19:43.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/sl_SI 2007-07-12 07:32:39.000000000 -0700 @@ -2126,8 +2126,8 @@ noexpr "" -currency_symbol "" +int_curr_symbol "" +currency_symbol "" mon_decimal_point "" mon_thousands_sep "" mon_grouping 3;3 @@ -2136,11 +2136,11 @@ negative_sign "" int_frac_digits 2 frac_digits 2 p_cs_precedes 0 -p_sep_by_space 2 +p_sep_by_space 1 n_cs_precedes 0 -n_sep_by_space 2 -p_sign_posn 2 -n_sign_posn 2 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 END LC_MONETARY LC_NUMERIC diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/sr_ME glibc-2.5-branch/localedata/locales/sr_ME --- glibc-2.5/localedata/locales/sr_ME 2006-09-29 11:28:32.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/sr_ME 2007-07-12 07:54:28.000000000 -0700 @@ -1,42 +1,38 @@ comment_char % escape_char / % -% Serbian Language in Jekavian dialect Locale for Serbia and Montenegro -% Source: sr_YU locale +% Serbian Language locale for Montenegro +% Source: sr_YU, sr_CS locale % Address: % % Contact: Danilo Segan -% Email: dsegan@gmx.net -% Tel: +381 63 8626082 +% Email: danilo@gnome.org +% Tel: +381 63 323456 % Fax: none % Language: sr -% Territory: CS -% Revision: 1.0 -% Date: 2003-08-13 +% Territory: ME +% Revision: 1.2 +% Date: 2006-10-11 % Application: general % Users: general % Charset: UTF-8, ISO-8859-5 % Distribution and use is free, also % for commercial purposes. -% -% TODO: -% -- fix LC_COLLATE to work correctly for latin alphabet too -% LC_IDENTIFICATION -title "Serbian locale for Serbia and Montenegro" -source "sr_YU locale" +title "Serbian locale for Montenegro" +source "sr_YU, sr_CS locale" address "" contact "Danilo Segan" email "bug-glibc@gnu.org" tel "" fax "" language "Serbian" -territory "Serbia and Montenegro" -revision "1.1" -date "2004-01-10" +territory "Montenegro" +revision "1.2" +date "2006-10-11" audience "general" -application "" +application "GNU locale" abbreviation "" % category i18n:1997;LC_IDENTIFICATION @@ -54,19 +50,33 @@ category i18n:1997;LC_MEASUREMENT END LC_IDENTIFICATION LC_CTYPE -copy "sr_CS" +copy "i18n" END LC_CTYPE LC_COLLATE -copy "sr_CS" +copy "sr_RS" END LC_COLLATE LC_MONETARY -copy "sr_CS" +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;3 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 0 +p_sep_by_space 1 +n_cs_precedes 0 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 END LC_MONETARY LC_NUMERIC -copy "sr_CS" +copy "sr_RS" END LC_NUMERIC LC_TIME @@ -110,31 +120,46 @@ t_fmt_ampm "" date_fmt "/ / " -week 7;19971201;4 +% week 7;19971201;4 first_weekday 2 first_workday 2 END LC_TIME LC_MESSAGES -copy "sr_CS" +copy "sr_RS" END LC_MESSAGES LC_PAPER -copy "sr_CS" +copy "sr_RS" END LC_PAPER LC_NAME -copy "sr_CS" +copy "sr_RS" END LC_NAME LC_ADDRESS -copy "sr_CS" +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +country_post "" +country_name "" +country_num 499 +country_car "" +country_isbn "" +lang_name "" +lang_term "" +lang_lib "" +lang_ab "" END LC_ADDRESS LC_TELEPHONE -copy "sr_CS" +copy "sr_RS" END LC_TELEPHONE LC_MEASUREMENT -copy "sr_CS" +copy "sr_RS" END LC_MEASUREMENT diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/sr_RS glibc-2.5-branch/localedata/locales/sr_RS --- glibc-2.5/localedata/locales/sr_RS 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/localedata/locales/sr_RS 2007-07-12 07:54:28.000000000 -0700 @@ -0,0 +1,360 @@ +comment_char % +escape_char / +% +% Serbian Language Locale for Serbia +% Source: sr_YU, sr_CS locales +% Address: +% +% Contact: Danilo Segan +% Email: danilo@gnome.org +% Tel: +381 63 323456 +% Fax: none +% Language: sr +% Territory: RS +% Revision: 1.3 +% Date: 2006-10-09 +% Application: general +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. +% + +LC_IDENTIFICATION +title "Serbian locale for Serbia" +source "sr_YU, sr_CS locale" +address "" +contact "Danilo Segan" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Serbian" +territory "Serbia" +revision "1.3" +date "2006-10-09" +audience "general" +application "GNU locale" +abbreviation "" +% +category "i18n:1997";LC_IDENTIFICATION +category "i18n:1997";LC_CTYPE +category "i18n:1997";LC_COLLATE +category "i18n:1997";LC_MONETARY +category "i18n:1997";LC_NUMERIC +category "i18n:1997";LC_TIME +category "i18n:1997";LC_MESSAGES +category "i18n:1997";LC_PAPER +category "i18n:1997";LC_NAME +category "i18n:1997";LC_ADDRESS +category "i18n:1997";LC_TELEPHONE +category "i18n:1997";LC_MEASUREMENT +END LC_IDENTIFICATION + +LC_CTYPE +copy "i18n" +translit_start +include "translit_combining";"" + +% cyrillic -> latin + "";"" % d- + "" % gj + "" % dz + "" % j + "" % lj + "" % nj + "";"" % c' + "" % kj + "";"" % dz< + + "";"" % D- + "" % Gj + "" % Dz + "" % J + "" % Lj + "" % Nj + "";"" % C' + "" % Kj + "";"" % Dz< + + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "";"" % z< + "";"" % s< + "";"" % c< + + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "";"" % z< + "";"" % s< + "";"" % c< + +translit_end +END LC_CTYPE + + +LC_COLLATE + +copy "iso14651_t1" + +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol +collating-symbol +collating-symbol + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +collating-symbol +collating-symbol + +reorder-after + +reorder-after + + +reorder-after + + + + + +reorder-after + +reorder-after + +reorder-after + +reorder-after + + +reorder-after + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE + +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE + +reorder-end + +END LC_COLLATE + +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;3 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 0 +p_sep_by_space 1 +n_cs_precedes 0 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 +END LC_MONETARY + +LC_NUMERIC +decimal_point "" +thousands_sep "" +grouping 0;0 +END LC_NUMERIC + +LC_TIME + +abday "";"";/ + "";"";/ + "";"";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +d_t_fmt "/ +/ +" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ +/ +" +% week 7;19971201;4 +first_weekday 2 +first_workday 2 +END LC_TIME + +LC_MESSAGES +yesexpr "" +noexpr "" +END LC_MESSAGES + +LC_PAPER +height 297 +width 210 +END LC_PAPER + +LC_NAME +name_fmt "/ +" +name_gen "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +% FIXME: country_post is probably incorrect +country_post "" +country_name "" +country_num 688 +country_car "" +% FIXME: ISBN code is what? "86" that preceedes all the numbers? +country_isbn "" +lang_name "" +lang_term "" +lang_lib "" +lang_ab "" +END LC_ADDRESS + +LC_TELEPHONE +tel_int_fmt "/ +" +tel_dom_fmt "" +int_prefix "" +int_select "" +END LC_TELEPHONE + +LC_MEASUREMENT +measurement 1 +END LC_MEASUREMENT diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/sr_RS@latin glibc-2.5-branch/localedata/locales/sr_RS@latin --- glibc-2.5/localedata/locales/sr_RS@latin 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/localedata/locales/sr_RS@latin 2007-07-12 07:54:28.000000000 -0700 @@ -0,0 +1,174 @@ +comment_char % +escape_char / +% +% Serbian Language Locale for Serbia +% Source: sr_YU, sr_CS locales +% Address: +% +% Contact: Danilo Segan +% Email: danilo@gnome.org +% Tel: +381 63 323456 +% Fax: none +% Language: sr +% Territory: RS +% Revision: 1.3 +% Date: 2006-10-09 +% Application: general +% Users: general +% Charset: UTF-8, ISO-8859-2 +% Distribution and use is free, also +% for commercial purposes. +% + +LC_IDENTIFICATION +title "Serbian Latin locale for Serbia" +source "sr_YU, sr_CS locale" +address "" +contact "Danilo Segan" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Serbian" +territory "Serbia" +revision "1.3" +date "2006-10-09" +audience "general" +application "GNU locale" +abbreviation "" +% +category "i18n:1997";LC_IDENTIFICATION +category "i18n:1997";LC_CTYPE +category "i18n:1997";LC_COLLATE +category "i18n:1997";LC_MONETARY +category "i18n:1997";LC_NUMERIC +category "i18n:1997";LC_TIME +category "i18n:1997";LC_MESSAGES +category "i18n:1997";LC_PAPER +category "i18n:1997";LC_NAME +category "i18n:1997";LC_ADDRESS +category "i18n:1997";LC_TELEPHONE +category "i18n:1997";LC_MEASUREMENT +END LC_IDENTIFICATION + +LC_CTYPE +copy "i18n" +END LC_CTYPE + +LC_COLLATE +copy "sr_RS" +END LC_COLLATE + +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;3 +positive_sign "" +negative_sign "" +int_frac_digits 0 +frac_digits 0 +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 "sr_RS" +END LC_NUMERIC + +LC_TIME +abday "";"";/ + "";"";/ + "";"";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +d_t_fmt "/ +/ +" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ +/ +" +% week 7;19971201;4 +first_weekday 2 +first_workday 2 +END LC_TIME + +LC_MESSAGES +yesexpr "" +noexpr "" +END LC_MESSAGES + +LC_PAPER +copy "sr_RS" +END LC_PAPER + +LC_NAME +name_fmt "/ +" +name_gen "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +country_post "" +country_name "/ +" +country_num 688 +country_car "" +country_isbn "" +lang_name "" +lang_term "" +lang_lib "" +lang_ab "" +END LC_ADDRESS + +LC_TELEPHONE +copy "sr_RS" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "sr_RS" +END LC_MEASUREMENT diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/translit_neutral glibc-2.5-branch/localedata/locales/translit_neutral --- glibc-2.5/localedata/locales/translit_neutral 2002-04-20 00:14:27.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/translit_neutral 2007-07-12 08:13:29.000000000 -0700 @@ -116,6 +116,8 @@ include "translit_wide";"" % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +% FRACTION SLASH + % WORD JOINER "" % FUNCTION APPLICATION diff -pNur -x CVS -x libidn glibc-2.5/localedata/locales/tt_RU glibc-2.5-branch/localedata/locales/tt_RU --- glibc-2.5/localedata/locales/tt_RU 2006-07-30 15:19:43.000000000 -0700 +++ glibc-2.5-branch/localedata/locales/tt_RU 2006-10-06 08:34:42.000000000 -0700 @@ -1,7 +1,7 @@ comment_char % escape_char / % -% Tatar Language Locale for Tatarstan +% Tatar Language Locale for Russia % Source: % Contact: Pablo Saratxaga, Rinat Norkin % Email: , @@ -24,7 +24,7 @@ escape_char / % replace cyrillic alphabet LC_IDENTIFICATION -title "Tatar language locale for Tatarstan" +title "Tatar language locale for Russia" source "Rinat Norkin" address "" contact "Pablo Saratxaga, Rinat Norkin" @@ -32,7 +32,7 @@ email "pablo@mandrakesoft.com, rinat@tai tel "" fax "" language "Tatar" -territory "Tatarstan" +territory "Russia" revision "0.4" date "2001-01-28" diff -pNur -x CVS -x libidn glibc-2.5/localedata/SUPPORTED glibc-2.5-branch/localedata/SUPPORTED --- glibc-2.5/localedata/SUPPORTED 2006-09-29 11:29:11.000000000 -0700 +++ glibc-2.5-branch/localedata/SUPPORTED 2007-07-12 07:54:28.000000000 -0700 @@ -252,6 +252,7 @@ lt_LT.UTF-8/UTF-8 \ lt_LT/ISO-8859-13 \ lv_LV.UTF-8/UTF-8 \ lv_LV/ISO-8859-13 \ +mai_IN/UTF-8 \ mg_MG.UTF-8/UTF-8 \ mg_MG/ISO-8859-15 \ mi_NZ.UTF-8/UTF-8 \ @@ -320,6 +321,8 @@ sq_AL/ISO-8859-1 \ sr_CS.UTF-8/UTF-8 \ sr_CS/ISO-8859-5 \ sr_ME/UTF-8 \ +sr_RS/UTF-8 \ +sr_RS@latin/UTF-8 \ ss_ZA/UTF-8 \ st_ZA.UTF-8/UTF-8 \ st_ZA/ISO-8859-1 \ diff -pNur -x CVS -x libidn glibc-2.5/login/utmp_file.c glibc-2.5-branch/login/utmp_file.c --- glibc-2.5/login/utmp_file.c 2005-12-14 03:33:40.000000000 -0800 +++ glibc-2.5-branch/login/utmp_file.c 2007-07-12 09:58:03.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper and Paul Janzen , 1996. @@ -140,11 +140,11 @@ setutent_file (void) file_name = TRANSFORM_UTMP_FILE_NAME (__libc_utmp_file_name); - file_fd = open_not_cancel_2 (file_name, O_RDWR); + file_fd = open_not_cancel_2 (file_name, O_RDWR | O_LARGEFILE); if (file_fd == -1) { /* Hhm, read-write access did not work. Try read-only. */ - file_fd = open_not_cancel_2 (file_name, O_RDONLY); + file_fd = open_not_cancel_2 (file_name, O_RDONLY | O_LARGEFILE); if (file_fd == -1) return 0; } @@ -459,7 +459,7 @@ updwtmp_file (const char *file, const st int fd; /* Open WTMP file. */ - fd = open_not_cancel_2 (file, O_WRONLY); + fd = open_not_cancel_2 (file, O_WRONLY | O_LARGEFILE); if (fd < 0) return -1; diff -pNur -x CVS -x libidn glibc-2.5/malloc/arena.c glibc-2.5-branch/malloc/arena.c --- glibc-2.5/malloc/arena.c 2006-09-07 09:04:22.000000000 -0700 +++ glibc-2.5-branch/malloc/arena.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,5 +1,6 @@ /* Malloc implementation for multiple threads without lock contention. - Copyright (C) 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2003,2004,2005,2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Wolfram Gloger , 2001. @@ -59,10 +60,12 @@ typedef struct _heap_info { mstate ar_ptr; /* Arena for this heap. */ struct _heap_info *prev; /* Previous heap. */ size_t size; /* Current size in bytes. */ + size_t mprotect_size; /* Size in bytes that has been mprotected + PROT_READ|PROT_WRITE. */ /* Make sure the following data is properly aligned, particularly that sizeof (heap_info) + 2 * SIZE_SZ is a multiple of - MALLOG_ALIGNMENT. */ - char pad[-5 * SIZE_SZ & MALLOC_ALIGN_MASK]; + MALLOC_ALIGNMENT. */ + char pad[-6 * SIZE_SZ & MALLOC_ALIGN_MASK]; } heap_info; /* Get a compile-time error if the heap_info padding is not correct @@ -692,6 +695,7 @@ new_heap(size, top_pad) size_t size, top } h = (heap_info *)p2; h->size = size; + h->mprotect_size = size; THREAD_STAT(stat_n_heaps++); return h; } @@ -714,17 +718,34 @@ grow_heap(h, diff) heap_info *h; long di new_size = (long)h->size + diff; if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE) return -1; - if(mprotect((char *)h + h->size, diff, PROT_READ|PROT_WRITE) != 0) - return -2; + if((unsigned long) new_size > h->mprotect_size) { + if (mprotect((char *)h + h->mprotect_size, + (unsigned long) new_size - h->mprotect_size, + PROT_READ|PROT_WRITE) != 0) + return -2; + h->mprotect_size = new_size; + } } else { new_size = (long)h->size + diff; if(new_size < (long)sizeof(*h)) return -1; /* Try to re-map the extra heap space freshly to save memory, and make it inaccessible. */ - if((char *)MMAP((char *)h + new_size, -diff, PROT_NONE, - MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED) - return -2; +#ifdef _LIBC + if (__builtin_expect (__libc_enable_secure, 0)) +#else + if (1) +#endif + { + if((char *)MMAP((char *)h + new_size, -diff, PROT_NONE, + MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED) + return -2; + h->mprotect_size = new_size; + } +#ifdef _LIBC + else + madvise ((char *)h + new_size, -diff, MADV_DONTNEED); +#endif /*fprintf(stderr, "shrink %p %08lx\n", h, new_size);*/ } h->size = new_size; diff -pNur -x CVS -x libidn glibc-2.5/malloc/memusage.c glibc-2.5-branch/malloc/memusage.c --- glibc-2.5/malloc/memusage.c 2005-10-14 14:09:34.000000000 -0700 +++ glibc-2.5-branch/malloc/memusage.c 2007-01-12 07:25:43.000000000 -0800 @@ -1,5 +1,5 @@ /* Profile heap and stack memory usage of running program. - Copyright (C) 1998-2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -887,4 +887,10 @@ dest (void) fputc ('=', stderr); fputs ("\e[0;0m\n", stderr); } + + /* Any following malloc/free etc. calls should generate statistics again, + because otherwise freeing something that has been malloced before + this destructor (including struct header in front of it) wouldn't + be properly freed. */ + not_me = false; } diff -pNur -x CVS -x libidn glibc-2.5/malloc/memusage.sh glibc-2.5-branch/malloc/memusage.sh --- glibc-2.5/malloc/memusage.sh 2006-05-19 09:47:26.000000000 -0700 +++ glibc-2.5-branch/malloc/memusage.sh 2007-07-12 09:58:04.000000000 -0700 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999-2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1999-2004, 2005, 2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -77,6 +77,15 @@ warranty; not even for MERCHANTABILITY o exit 0 } +# These variables are local +buffer= +data= +memusagestat_args= +notimer= +png= +progname= +tracemmap= + # Process arguments. But stop as soon as the program name is found. while test $# -gt 0; do case "$1" in @@ -213,15 +222,8 @@ datafile= if test -n "$data"; then datafile="$data" elif test -n "$png"; then - datafile=$(mktemp ${TMPDIR:-/tmp}/memusage.XXXXXX 2> /dev/null) - if test $? -ne 0; then - # Lame, but if there is no `mktemp' program the user cannot expect more. - if test "$RANDOM" != "$RANDOM"; then - datafile=${TMPDIR:-/tmp}/memusage.$RANDOM - else - datafile=${TMPDIR:-/tmp}/memusage.$$ - fi - fi + datafile=$(mktemp -t memusage.XXXXXX) || exit + trap 'rm -f "$datafile"; exit 1' HUP INT QUIT TERM PIPE fi if test -n "$datafile"; then add_env="$add_env MEMUSAGE_OUTPUT=$datafile" diff -pNur -x CVS -x libidn glibc-2.5/manual/message.texi glibc-2.5-branch/manual/message.texi --- glibc-2.5/manual/message.texi 2003-08-29 00:15:18.000000000 -0700 +++ glibc-2.5-branch/manual/message.texi 2006-10-02 09:02:53.000000000 -0700 @@ -1189,7 +1189,7 @@ the rules of how to select the plural fo with every language this is the only viable solution except for hardcoding the information in the code (which still would require the possibility of extensions to not prevent the use of new languages). The -details are explained in the GNU @code{gettext} manual. Here only a a +details are explained in the GNU @code{gettext} manual. Here only a bit of information is provided. The information about the plural form selection has to be stored in the @@ -1590,7 +1590,7 @@ the user to select the message s/he want them. The POSIX locale model uses the environment variables @code{LC_COLLATE}, -@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{NUMERIC}, +@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{LC_NUMERIC}, and @code{LC_TIME} to select the locale which is to be used. This way the user can influence lots of functions. As we mentioned above the @code{gettext} functions also take advantage of this. diff -pNur -x CVS -x libidn glibc-2.5/manual/stdio.texi glibc-2.5-branch/manual/stdio.texi --- glibc-2.5/manual/stdio.texi 2006-02-03 23:12:54.000000000 -0800 +++ glibc-2.5-branch/manual/stdio.texi 2006-10-06 08:33:02.000000000 -0700 @@ -2393,8 +2393,9 @@ This function is similar to @code{sprint allocates a string (as with @code{malloc}; @pxref{Unconstrained Allocation}) to hold the output, instead of putting the output in a buffer you allocate in advance. The @var{ptr} argument should be the -address of a @code{char *} object, and @code{asprintf} stores a pointer -to the newly allocated string at that location. +address of a @code{char *} object, and a successful call to +@code{asprintf} stores a pointer to the newly allocated string at that +location. The return value is the number of characters allocated for the buffer, or less than zero if an error occurred. Usually this means that the buffer diff -pNur -x CVS -x libidn glibc-2.5/math/basic-test.c glibc-2.5-branch/math/basic-test.c --- glibc-2.5/math/basic-test.c 2001-07-05 21:55:35.000000000 -0700 +++ glibc-2.5-branch/math/basic-test.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -44,7 +44,7 @@ NAME (void) \ \ zero_var = 0.0; \ one_var = 1.0; \ - NaN_var = zero_var/zero_var; \ + NaN_var = zero_var / zero_var; \ Inf_var = one_var / zero_var; \ \ (void) &zero_var; \ @@ -103,21 +103,51 @@ NAME (void) \ check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \ } +#define TEST_TRUNC(NAME, FLOAT, DOUBLE) \ +void \ +NAME (void) \ +{ \ + volatile DOUBLE Inf_var, NaN_var, zero_var, one_var; \ + FLOAT x1, x2; \ + \ + zero_var = 0.0; \ + one_var = 1.0; \ + NaN_var = zero_var / zero_var; \ + Inf_var = one_var / zero_var; \ + \ + (void) &NaN_var; \ + (void) &Inf_var; \ + \ + x1 = (FLOAT) NaN_var; \ + check (" "#FLOAT" x = ("#FLOAT") ("#DOUBLE") NaN", isnan (x1) != 0); \ + x2 = (FLOAT) Inf_var; \ + check (" "#FLOAT" x = ("#FLOAT") ("#DOUBLE") Inf", isinf (x2) != 0); \ +} + TEST_FUNC (float_test, float, nanf, FLT_EPSILON, HUGE_VALF) TEST_FUNC (double_test, double, nan, DBL_EPSILON, HUGE_VAL) +TEST_TRUNC (truncdfsf_test, float, double) #ifndef NO_LONG_DOUBLE TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL) +TEST_TRUNC (trunctfsf_test, float, long double) +TEST_TRUNC (trunctfdf_test, double, long double) #endif int -main (void) +do_test (void) { float_test (); double_test (); + truncdfsf_test(); #ifndef NO_LONG_DOUBLE ldouble_test (); + trunctfsf_test(); + trunctfdf_test(); #endif return errors != 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/math/bug-nextafter.c glibc-2.5-branch/math/bug-nextafter.c --- glibc-2.5/math/bug-nextafter.c 2003-12-09 10:10:47.000000000 -0800 +++ glibc-2.5-branch/math/bug-nextafter.c 2007-07-12 08:08:17.000000000 -0700 @@ -4,6 +4,9 @@ #include #include +float zero = 0.0; +float inf = INFINITY; + int main (void) { @@ -34,6 +37,81 @@ main (void) ++result; } + i = 0; + m = FLT_MIN; + feclearexcept (FE_ALL_EXCEPT); + i = nextafterf (m, i); + if (i < 0 || i >= FLT_MIN) + { + puts ("nextafterf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf+ did not underflow"); + ++result; + } + i = 0; + feclearexcept (FE_ALL_EXCEPT); + i = nextafterf (-m, -i); + if (i > 0 || i <= -FLT_MIN) + { + puts ("nextafterf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf- did not underflow"); + ++result; + } + i = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + m = nextafterf (zero, inf); + if (m < 0.0 || m >= FLT_MIN) + { + puts ("nextafterf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafterf (m, i) != 0.0) + { + puts ("nextafterf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + m = nextafterf (copysignf (zero, -1.0), -inf); + if (m > 0.0 || m <= -FLT_MIN) + { + puts ("nextafterf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafterf (m, -i) != 0.0) + { + puts ("nextafterf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterf- did not underflow"); + ++result; + } + double di = INFINITY; double dm = DBL_MAX; feclearexcept (FE_ALL_EXCEPT); @@ -59,5 +137,182 @@ main (void) ++result; } + di = 0; + dm = DBL_MIN; + feclearexcept (FE_ALL_EXCEPT); + di = nextafter (dm, di); + if (di < 0 || di >= DBL_MIN) + { + puts ("nextafter+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter+ did not underflow"); + ++result; + } + di = 0; + feclearexcept (FE_ALL_EXCEPT); + di = nextafter (-dm, -di); + if (di > 0 || di <= -DBL_MIN) + { + puts ("nextafter- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter- did not underflow"); + ++result; + } + di = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + dm = nextafter (zero, inf); + if (dm < 0.0 || dm >= DBL_MIN) + { + puts ("nextafter+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafter (dm, di) != 0.0) + { + puts ("nextafter+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + dm = nextafter (copysign (zero, -1.0), -inf); + if (dm > 0.0 || dm <= -DBL_MIN) + { + puts ("nextafter- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafter (dm, -di) != 0.0) + { + puts ("nextafter- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafter- did not underflow"); + ++result; + } + +#ifndef NO_LONG_DOUBLE + long double li = INFINITY; + long double lm = LDBL_MAX; + feclearexcept (FE_ALL_EXCEPT); + if (nextafterl (lm, li) != li) + { + puts ("nextafterl+ failed"); + ++result; + } + if (fetestexcept (FE_OVERFLOW) == 0) + { + puts ("nextafterl+ did not overflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafterl (-lm, -li) != -li) + { + puts ("nextafterl failed"); + ++result; + } + if (fetestexcept (FE_OVERFLOW) == 0) + { + puts ("nextafterl- did not overflow"); + ++result; + } + + li = 0; + lm = LDBL_MIN; + feclearexcept (FE_ALL_EXCEPT); + li = nextafterl (lm, li); + if (li < 0 || li >= LDBL_MIN) + { + puts ("nextafterl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl+ did not underflow"); + ++result; + } + li = 0; + feclearexcept (FE_ALL_EXCEPT); + li = nextafterl (-lm, -li); + if (li > 0 || li <= -LDBL_MIN) + { + puts ("nextafterl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl- did not underflow"); + ++result; + } + li = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + lm = nextafterl (zero, inf); + if (lm < 0.0 || lm >= LDBL_MIN) + { + puts ("nextafterl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafterl (lm, li) != 0.0) + { + puts ("nextafterl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + lm = nextafterl (copysign (zero, -1.0), -inf); + if (lm > 0.0 || lm <= -LDBL_MIN) + { + puts ("nextafterl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nextafterl (lm, -li) != 0.0) + { + puts ("nextafterl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nextafterl- did not underflow"); + ++result; + } +#endif + return result; } diff -pNur -x CVS -x libidn glibc-2.5/math/bug-nexttoward.c glibc-2.5-branch/math/bug-nexttoward.c --- glibc-2.5/math/bug-nexttoward.c 2003-12-07 13:13:09.000000000 -0800 +++ glibc-2.5-branch/math/bug-nexttoward.c 2007-07-12 08:08:17.000000000 -0700 @@ -4,6 +4,9 @@ #include #include +float zero = 0.0; +float inf = INFINITY; + int main (void) { @@ -35,6 +38,81 @@ main (void) ++result; } + fi = 0; + m = FLT_MIN; + feclearexcept (FE_ALL_EXCEPT); + fi = nexttowardf (m, fi); + if (fi < 0 || fi >= FLT_MIN) + { + puts ("nexttowardf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf+ did not underflow"); + ++result; + } + fi = 0; + feclearexcept (FE_ALL_EXCEPT); + fi = nexttowardf (-m, -fi); + if (fi > 0 || fi <= -FLT_MIN) + { + puts ("nexttowardf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf- did not underflow"); + ++result; + } + fi = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + m = nexttowardf (zero, inf); + if (m < 0.0 || m >= FLT_MIN) + { + puts ("nexttowardf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardf (m, fi) != 0.0) + { + puts ("nexttowardf+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + m = nexttowardf (copysignf (zero, -1.0), -inf); + if (m > 0.0 || m <= -FLT_MIN) + { + puts ("nexttowardf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardf (m, -fi) != 0.0) + { + puts ("nexttowardf- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardf- did not underflow"); + ++result; + } + tl = (long double) DBL_MAX + 1.0e305L; double di = INFINITY; double dm = DBL_MAX; @@ -61,5 +139,182 @@ main (void) ++result; } + di = 0; + dm = DBL_MIN; + feclearexcept (FE_ALL_EXCEPT); + di = nexttoward (dm, di); + if (di < 0 || di >= DBL_MIN) + { + puts ("nexttoward+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward+ did not underflow"); + ++result; + } + di = 0; + feclearexcept (FE_ALL_EXCEPT); + di = nexttoward (-dm, -di); + if (di > 0 || di <= -DBL_MIN) + { + puts ("nexttoward- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward- did not underflow"); + ++result; + } + di = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + dm = nexttoward (zero, inf); + if (dm < 0.0 || dm >= DBL_MIN) + { + puts ("nexttoward+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttoward (dm, di) != 0.0) + { + puts ("nexttoward+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + dm = nexttoward (copysign (zero, -1.0), -inf); + if (dm > 0.0 || dm <= -DBL_MIN) + { + puts ("nexttoward- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttoward (dm, -di) != 0.0) + { + puts ("nexttoward- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttoward- did not underflow"); + ++result; + } + +#ifndef NO_LONG_DOUBLE + long double li = INFINITY; + long double lm = LDBL_MAX; + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardl (lm, li) != li) + { + puts ("nexttowardl+ failed"); + ++result; + } + if (fetestexcept (FE_OVERFLOW) == 0) + { + puts ("nexttowardl+ did not overflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardl (-lm, -li) != -li) + { + puts ("nexttowardl failed"); + ++result; + } + if (fetestexcept (FE_OVERFLOW) == 0) + { + puts ("nexttowardl- did not overflow"); + ++result; + } + + li = 0; + lm = LDBL_MIN; + feclearexcept (FE_ALL_EXCEPT); + li = nexttowardl (lm, li); + if (li < 0 || li >= LDBL_MIN) + { + puts ("nexttowardl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl+ did not underflow"); + ++result; + } + li = 0; + feclearexcept (FE_ALL_EXCEPT); + li = nexttowardl (-lm, -li); + if (li > 0 || li <= -LDBL_MIN) + { + puts ("nexttowardl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl- did not underflow"); + ++result; + } + li = -INFINITY; + feclearexcept (FE_ALL_EXCEPT); + lm = nexttowardl (zero, inf); + if (lm < 0.0 || lm >= LDBL_MIN) + { + puts ("nexttowardl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardl (lm, li) != 0.0) + { + puts ("nexttowardl+ failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl+ did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + lm = nexttowardl (copysign (zero, -1.0), -inf); + if (lm > 0.0 || lm <= -LDBL_MIN) + { + puts ("nexttowardl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl- did not underflow"); + ++result; + } + feclearexcept (FE_ALL_EXCEPT); + if (nexttowardl (lm, -li) != 0.0) + { + puts ("nexttowardl- failed"); + ++result; + } + if (fetestexcept (FE_UNDERFLOW) == 0) + { + puts ("nexttowardl- did not underflow"); + ++result; + } +#endif + return result; } diff -pNur -x CVS -x libidn glibc-2.5/math/libm-test.inc glibc-2.5-branch/math/libm-test.inc --- glibc-2.5/math/libm-test.inc 2006-09-20 12:36:26.000000000 -0700 +++ glibc-2.5-branch/math/libm-test.inc 2007-07-12 07:58:36.000000000 -0700 @@ -4127,7 +4127,9 @@ log_test (void) TEST_f_f (log, 1, 0); TEST_f_f (log, -1, nan_value, INVALID_EXCEPTION); + TEST_f_f (log, minus_infty, nan_value, INVALID_EXCEPTION); TEST_f_f (log, plus_infty, plus_infty); + TEST_f_f (log, nan_value, nan_value); TEST_f_f (log, M_El, 1); TEST_f_f (log, 1.0 / M_El, -1); @@ -4157,6 +4159,7 @@ log10_test (void) /* log10 (x) == NaN plus invalid exception if x < 0. */ TEST_f_f (log10, -1, nan_value, INVALID_EXCEPTION); + TEST_f_f (log10, minus_infty, nan_value, INVALID_EXCEPTION); TEST_f_f (log10, plus_infty, plus_infty); TEST_f_f (log10, nan_value, nan_value); @@ -4188,6 +4191,7 @@ log1p_test (void) TEST_f_f (log1p, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (log1p, -2, nan_value, INVALID_EXCEPTION); + TEST_f_f (log1p, minus_infty, nan_value, INVALID_EXCEPTION); TEST_f_f (log1p, plus_infty, plus_infty); TEST_f_f (log1p, nan_value, nan_value); @@ -4218,6 +4222,7 @@ log2_test (void) TEST_f_f (log2, 1, 0); TEST_f_f (log2, -1, nan_value, INVALID_EXCEPTION); + TEST_f_f (log2, minus_infty, nan_value, INVALID_EXCEPTION); TEST_f_f (log2, plus_infty, plus_infty); TEST_f_f (log2, nan_value, nan_value); @@ -4614,6 +4619,17 @@ pow_test (void) /* pow (x, NaN) == NaN. */ TEST_ff_f (pow, 3.0, nan_value, nan_value); + TEST_ff_f (pow, minus_zero, nan_value, nan_value); + TEST_ff_f (pow, plus_infty, nan_value, nan_value); + TEST_ff_f (pow, -3.0, nan_value, nan_value); + TEST_ff_f (pow, minus_infty, nan_value, nan_value); + + TEST_ff_f (pow, nan_value, 3.0, nan_value); + TEST_ff_f (pow, nan_value, -3.0, nan_value); + TEST_ff_f (pow, nan_value, plus_infty, nan_value); + TEST_ff_f (pow, nan_value, minus_infty, nan_value); + TEST_ff_f (pow, nan_value, 2.5, nan_value); + TEST_ff_f (pow, nan_value, -2.5, nan_value); TEST_ff_f (pow, 1, plus_infty, 1); TEST_ff_f (pow, -1, plus_infty, 1); diff -pNur -x CVS -x libidn glibc-2.5/math/math_private.h glibc-2.5-branch/math/math_private.h --- glibc-2.5/math/math_private.h 2005-11-21 07:43:03.000000000 -0800 +++ glibc-2.5-branch/math/math_private.h 2007-07-12 08:08:17.000000000 -0700 @@ -332,4 +332,10 @@ extern double __slowexp (double __x); extern double __slowpow (double __x, double __y, double __z); extern void __docos (double __x, double __dx, double __v[]); +#ifndef math_opt_barrier +#define math_opt_barrier(x) \ +({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; }) +#define math_force_eval(x) __asm __volatile ("" : : "m" (x)) +#endif + #endif /* _MATH_PRIVATE_H_ */ diff -pNur -x CVS -x libidn glibc-2.5/math/s_nextafter.c glibc-2.5-branch/math/s_nextafter.c --- glibc-2.5/math/s_nextafter.c 2005-12-14 02:33:59.000000000 -0800 +++ glibc-2.5-branch/math/s_nextafter.c 2007-07-12 08:08:17.000000000 -0700 @@ -26,7 +26,7 @@ static char rcsid[] = "$NetBSD: s_nextaf #define nexttoward __internal_nexttoward #include -#include "math_private.h" +#include #include #ifdef __STDC__ @@ -49,9 +49,12 @@ static char rcsid[] = "$NetBSD: s_nextaf return x+y; if(x==y) return y; /* x=y, return y */ if((ix|lx)==0) { /* x == 0 */ + double u; INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */ - y = x*x; - if(y==x) return y; else return x; /* raise underflow flag */ + u = math_opt_barrier (x); + u = u*u; + math_force_eval (u); /* raise underflow flag */ + return x; } if(hx>=0) { /* x > 0 */ if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */ @@ -74,15 +77,12 @@ static char rcsid[] = "$NetBSD: s_nextaf if(hy>=0x7ff00000) { x = x+x; /* overflow */ if (FLT_EVAL_METHOD != 0 && FLT_EVAL_METHOD != 1) - asm ("" : "=m"(x) : "m"(x)); + asm ("" : "+m"(x)); return x; /* overflow */ } - if(hy<0x00100000) { /* underflow */ - y = x*x; - if(y!=x) { /* raise underflow flag */ - INSERT_WORDS(y,hx,lx); - return y; - } + if(hy<0x00100000) { + double u = x*x; /* underflow */ + math_force_eval (u); /* raise underflow flag */ } INSERT_WORDS(x,hx,lx); return x; diff -pNur -x CVS -x libidn glibc-2.5/math/s_nexttowardf.c glibc-2.5-branch/math/s_nexttowardf.c --- glibc-2.5/math/s_nexttowardf.c 2005-12-14 02:34:14.000000000 -0800 +++ glibc-2.5-branch/math/s_nexttowardf.c 2007-07-12 08:08:17.000000000 -0700 @@ -21,7 +21,7 @@ */ #include -#include "math_private.h" +#include #include #ifdef __STDC__ @@ -45,10 +45,12 @@ return x+y; if((long double) x==y) return y; /* x=y, return y */ if(ix==0) { /* x == 0 */ - float x2; + float u; SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/ - x2 = x*x; - if(x2==x) return x2; else return x; /* raise underflow flag */ + u = math_opt_barrier (x); + u = u * u; + math_force_eval (u); /* raise underflow flag */ + return x; } if(hx>=0) { /* x > 0 */ if(hy<0||(ix>>23)>(iy>>20)-0x380 @@ -70,15 +72,12 @@ x = x+x; /* overflow */ if (FLT_EVAL_METHOD != 0) /* Force conversion to float. */ - asm ("" : "=m"(x) : "m"(x)); + asm ("" : "+m"(x)); return x; } - if(hy<0x00800000) { /* underflow */ - float x2 = x*x; - if(x2!=x) { /* raise underflow flag */ - SET_FLOAT_WORD(x2,hx); - return x2; - } + if(hy<0x00800000) { + float u = x*x; /* underflow */ + math_force_eval (u); /* raise underflow flag */ } SET_FLOAT_WORD(x,hx); return x; diff -pNur -x CVS -x libidn glibc-2.5/math/test-misc.c glibc-2.5-branch/math/test-misc.c --- glibc-2.5/math/test-misc.c 2005-03-18 16:28:20.000000000 -0800 +++ glibc-2.5-branch/math/test-misc.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,5 +1,5 @@ /* Miscellaneous tests which don't fit anywhere else. - Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -44,7 +44,6 @@ main (void) } } -# if __GNUC__ >= 3 || __GNUC_MINOR__ >= 96 { long double x; long double m; @@ -52,17 +51,17 @@ main (void) int e; int i; -# if LDBL_MANT_DIG == 64 +# if LDBL_MANT_DIG == 64 m = 0xf.fffffffffffffffp-4L; -# elif LDBL_MANT_DIG == 106 +# elif LDBL_MANT_DIG == 106 /* This has to match the mantissa of LDBL_MAX which actually does have a missing bit in the middle. */ m = 0x1.fffffffffffff7ffffffffffff8p-1L; -# elif LDBL_MANT_DIG == 113 +# elif LDBL_MANT_DIG == 113 m = 0x1.ffffffffffffffffffffffffffffp-1L; -# else -# error "Please adjust" -# endif +# else +# error "Please adjust" +# endif for (i = LDBL_MAX_EXP, x = LDBL_MAX; i >= LDBL_MIN_EXP; --i, x /= 2.0L) { @@ -106,9 +105,8 @@ main (void) } } -# endif -#if 0 +# if 0 { int e; long double r = frexpl (LDBL_MIN * LDBL_EPSILON, &e); @@ -126,7 +124,7 @@ main (void) result = 1; } } -#endif +# endif #endif { @@ -1183,5 +1181,59 @@ main (void) } #endif + volatile float f1 = FLT_MAX; + volatile float f2 = FLT_MAX / 2; + (void) &f1; + (void) &f2; + feclearexcept (FE_ALL_EXCEPT); + f2 += f1; + int fe = fetestexcept (FE_ALL_EXCEPT); + if (fe != (FE_OVERFLOW | FE_INEXACT)) + { + printf ("float overflow test failed: %x\n", fe); + result = 1; + } + + volatile double d1 = DBL_MAX; + volatile double d2 = DBL_MAX / 2; + (void) &d1; + (void) &d2; + feclearexcept (FE_ALL_EXCEPT); + d2 += d1; + fe = fetestexcept (FE_ALL_EXCEPT); + if (fe != (FE_OVERFLOW | FE_INEXACT)) + { + printf ("double overflow test failed: %x\n", fe); + result = 1; + } + +#ifndef NO_LONG_DOUBLE + volatile long double ld1 = LDBL_MAX; + volatile long double ld2 = LDBL_MAX / 2; + (void) &ld1; + (void) &ld2; + feclearexcept (FE_ALL_EXCEPT); + ld2 += ld1; + fe = fetestexcept (FE_ALL_EXCEPT); + if (fe != (FE_OVERFLOW | FE_INEXACT)) + { + printf ("long double overflow test failed: %x\n", fe); + result = 1; + } +#endif + +#if !defined NO_LONG_DOUBLE && LDBL_MANT_DIG == 113 + volatile long double ld3 = 0x1.0000000000010000000100000001p+1; + volatile long double ld4 = 0x1.0000000000000000000000000001p+1; + (void) &ld3; + (void) &ld4; + ld3 -= ld4; + if (ld3 != 0x1.0p-47) + { + printf ("long double subtraction test failed %.28La\n", ld3); + result = 1; + } +#endif + return result; } diff -pNur -x CVS -x libidn glibc-2.5/misc/getusershell.c glibc-2.5-branch/misc/getusershell.c --- glibc-2.5/misc/getusershell.c 2006-05-15 11:56:36.000000000 -0700 +++ glibc-2.5-branch/misc/getusershell.c 2007-01-12 09:11:28.000000000 -0800 @@ -98,7 +98,7 @@ initshells() register char **sp, *cp; register FILE *fp; struct stat64 statb; - int flen; + size_t flen; free(shells); shells = NULL; @@ -114,9 +114,11 @@ initshells() okshells[1] = _PATH_CSHELL; return (char **) okshells; } - if ((strings = malloc((u_int)statb.st_size + 1)) == NULL) + if (statb.st_size > ~(size_t)0 / sizeof (char *) * 3) goto init_okshells; - shells = calloc((unsigned)statb.st_size / 3, sizeof (char *)); + if ((strings = malloc(statb.st_size + 2)) == NULL) + goto init_okshells; + shells = malloc(statb.st_size / 3 * sizeof (char *)); if (shells == NULL) { free(strings); strings = NULL; @@ -124,11 +126,11 @@ initshells() } sp = shells; cp = strings; - flen = statb.st_size; + flen = statb.st_size + 2; while (fgets_unlocked(cp, flen - (cp - strings), fp) != NULL) { while (*cp != '#' && *cp != '/' && *cp != '\0') cp++; - if (*cp == '#' || *cp == '\0') + if (*cp == '#' || *cp == '\0' || cp[1] == '\0') continue; *sp++ = cp; while (!isspace(*cp) && *cp != '#' && *cp != '\0') diff -pNur -x CVS -x libidn glibc-2.5/misc/madvise.c glibc-2.5-branch/misc/madvise.c --- glibc-2.5/misc/madvise.c 2005-12-14 01:36:14.000000000 -0800 +++ glibc-2.5-branch/misc/madvise.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994,1995,1996,1997,2000,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,5 +29,6 @@ madvise (__ptr_t addr, size_t len, int a __set_errno (ENOSYS); return -1; } +libc_hidden_def (madvise) stub_warning (madvise) #include diff -pNur -x CVS -x libidn glibc-2.5/misc/Makefile glibc-2.5-branch/misc/Makefile --- glibc-2.5/misc/Makefile 2006-06-17 10:00:58.000000000 -0700 +++ glibc-2.5-branch/misc/Makefile 2007-01-12 09:20:09.000000000 -0800 @@ -78,7 +78,7 @@ endif gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ - tst-error1 tst-pselect tst-insremque + tst-error1 tst-pselect tst-insremque tst-mntent2 ifeq (no,$(cross-compiling)) tests: $(objpfx)tst-error1-mem endif diff -pNur -x CVS -x libidn glibc-2.5/misc/mntent_r.c glibc-2.5-branch/misc/mntent_r.c --- glibc-2.5/misc/mntent_r.c 2003-12-17 15:29:02.000000000 -0800 +++ glibc-2.5-branch/misc/mntent_r.c 2007-01-12 09:20:09.000000000 -0800 @@ -1,5 +1,6 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2001, 2002, 2003, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -278,14 +279,11 @@ __hasmntopt (const struct mntent *mnt, c while ((p = strstr (rest, opt)) != NULL) { - if (p == rest - || (p[-1] == ',' - && (p[optlen] == '\0' || - p[optlen] == '=' || - p[optlen] == ','))) + if ((p == rest || p[-1] == ',') + && (p[optlen] == '\0' || p[optlen] == '=' || p[optlen] == ',')) return p; - rest = strchr (rest, ','); + rest = strchr (p, ','); if (rest == NULL) break; ++rest; diff -pNur -x CVS -x libidn glibc-2.5/misc/tst-mntent2.c glibc-2.5-branch/misc/tst-mntent2.c --- glibc-2.5/misc/tst-mntent2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/misc/tst-mntent2.c 2007-01-12 09:20:09.000000000 -0800 @@ -0,0 +1,41 @@ +#include +#include +#include + + +int +main (void) +{ + int result = 0; + struct mntent mef; + + mef.mnt_fsname = strdupa ("/dev/sdf6"); + mef.mnt_dir = strdupa ("/some dir"); + mef.mnt_type = strdupa ("ext3"); + mef.mnt_opts = strdupa ("opt1,opt2,noopt=6,rw,norw,brw"); + mef.mnt_freq = 1; + mef.mnt_passno = 2; + +#define TEST(opt, found) \ + if (!!hasmntopt (&mef, (opt)) != (found)) \ + { \ + printf ("Option %s was %sfound\n", (opt), (found) ? "not " : ""); \ + result = 1; \ + } + + TEST ("opt1", 1) + TEST ("opt2", 1) + TEST ("noopt", 1) + TEST ("rw", 1) + TEST ("norw", 1) + TEST ("brw", 1) + TEST ("opt", 0) + TEST ("oopt", 0) + TEST ("w", 0) + TEST ("r", 0) + TEST ("br", 0) + TEST ("nor", 0) + TEST ("or", 0) + + return result; +} diff -pNur -x CVS -x libidn glibc-2.5/misc/tst-pselect.c glibc-2.5-branch/misc/tst-pselect.c --- glibc-2.5/misc/tst-pselect.c 2006-01-21 11:58:31.000000000 -0800 +++ glibc-2.5-branch/misc/tst-pselect.c 2007-01-12 09:49:04.000000000 -0800 @@ -29,7 +29,16 @@ do_test (void) return 1; } - if (sigblock (SIGUSR1) != 0) + sa.sa_handler = SIG_IGN; + sa.sa_flags = SA_NOCLDWAIT; + + if (sigaction (SIGCHLD, &sa, NULL) != 0) + { + puts ("2nd sigaction failed"); + return 1; + } + + if (sigblock (sigmask (SIGUSR1)) != 0) { puts ("sigblock failed"); return 1; @@ -52,6 +61,7 @@ do_test (void) struct timespec to = { .tv_sec = 0, .tv_nsec = 500000000 }; + pid_t parent = getpid (); pid_t p = fork (); if (p == 0) { @@ -63,6 +73,9 @@ do_test (void) int e; do { + if (getppid () != parent) + exit (2); + errno = 0; e = pselect (fds[0][0] + 1, &rfds, NULL, NULL, &to, &ss); } @@ -108,12 +121,6 @@ do_test (void) return 1; } - if (TEMP_FAILURE_RETRY (waitpid (p, NULL, 0)) != p) - { - puts ("waitpid failed"); - return 1; - } - return 0; } diff -pNur -x CVS -x libidn glibc-2.5/nis/Makefile glibc-2.5-branch/nis/Makefile --- glibc-2.5/nis/Makefile 2006-04-13 22:45:49.000000000 -0700 +++ glibc-2.5-branch/nis/Makefile 2007-01-12 06:37:24.000000000 -0800 @@ -64,7 +64,7 @@ libnss_nis-routines := $(addprefix nis-, libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes)) libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \ - nss-nisplus + nss-nisplus nisplus-initgroups libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) include ../Rules diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_call.c glibc-2.5-branch/nis/nis_call.c --- glibc-2.5/nis/nis_call.c 2006-08-07 10:39:39.000000000 -0700 +++ glibc-2.5-branch/nis/nis_call.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2001,2004,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -25,8 +26,11 @@ #include #include #include +#include +#include #include #include +#include #include "nis_xdr.h" #include "nis_intern.h" @@ -107,10 +111,79 @@ __nisbind_next (dir_binding *bind) } libnsl_hidden_def (__nisbind_next) +static struct ckey_cache_entry +{ + struct in_addr inaddr; + in_port_t port; + unsigned int protocol; + des_block ckey; +} *ckey_cache; +static size_t ckey_cache_size; +static size_t ckey_cache_allocated; +static pid_t ckey_cache_pid; +static uid_t ckey_cache_euid; +__libc_lock_define_initialized (static, ckey_cache_lock) + +static bool_t +get_ckey (des_block *ckey, struct sockaddr_in *addr, unsigned int protocol) +{ + size_t i; + pid_t pid = getpid (); + uid_t euid = geteuid (); + bool_t ret = FALSE; + + __libc_lock_lock (ckey_cache_lock); + + if (ckey_cache_pid != pid || ckey_cache_euid != euid) + { + ckey_cache_size = 0; + ckey_cache_pid = pid; + ckey_cache_euid = euid; + } + + for (i = 0; i < ckey_cache_size; ++i) + if (ckey_cache[i].port == addr->sin_port + && ckey_cache[i].protocol == protocol + && memcmp (&ckey_cache[i].inaddr, &addr->sin_addr, + sizeof (addr->sin_addr)) == 0) + { + *ckey = ckey_cache[i].ckey; + ret = TRUE; + break; + } + + if (!ret && key_gendes (ckey) >= 0) + { + ret = TRUE; + /* Don't grow the cache indefinitely. */ + if (ckey_cache_size == 256) + ckey_cache_size = 0; + if (ckey_cache_size == ckey_cache_allocated) + { + size_t size = ckey_cache_allocated ? ckey_cache_allocated * 2 : 16; + struct ckey_cache_entry *new_cache + = realloc (ckey_cache, size * sizeof (*ckey_cache)); + if (new_cache != NULL) + { + ckey_cache = new_cache; + ckey_cache_allocated = size; + } + } + ckey_cache[ckey_cache_size].inaddr = addr->sin_addr; + ckey_cache[ckey_cache_size].port = addr->sin_port; + ckey_cache[ckey_cache_size].protocol = protocol; + ckey_cache[ckey_cache_size++].ckey = *ckey; + } + + __libc_lock_unlock (ckey_cache_lock); + return ret; +} + nis_error __nisbind_connect (dir_binding *dbp) { nis_server *serv; + u_short port; if (dbp == NULL) return NIS_FAIL; @@ -128,9 +201,12 @@ __nisbind_connect (dir_binding *dbp) /* Check, if the host is online and rpc.nisd is running. Much faster then the clnt*_create functions: */ - if (__pmap_getnisport (&dbp->addr, NIS_PROG, NIS_VERSION, IPPROTO_UDP) == 0) + port = __pmap_getnisport (&dbp->addr, NIS_PROG, NIS_VERSION, + dbp->use_udp ? IPPROTO_UDP : IPPROTO_TCP); + if (port == 0) return NIS_RPCERROR; + dbp->addr.sin_port = htons (port); dbp->socket = RPC_ANYSOCK; if (dbp->use_udp) dbp->clnt = clntudp_create (&dbp->addr, NIS_PROG, NIS_VERSION, @@ -153,17 +229,16 @@ __nisbind_connect (dir_binding *dbp) { char netname[MAXNETNAMELEN + 1]; char *p; + des_block ckey; - p = stpcpy (netname, "unix."); + p = stpcpy (netname, "unix@"); strncpy (p, serv->name, MAXNETNAMELEN - 5); netname[MAXNETNAMELEN] = '\0'; - // XXX What is this supposed to do? If we really want to replace - // XXX the first dot, then we might as well use unix@ as the - // XXX prefix string. --drepper - p = strchr (netname, '.'); - *p = '@'; - dbp->clnt->cl_auth = - authdes_pk_create (netname, &serv->pkey, 300, NULL, NULL); + dbp->clnt->cl_auth = NULL; + if (get_ckey (&ckey, &dbp->addr, + dbp->use_udp ? IPPROTO_UDP : IPPROTO_TCP)) + dbp->clnt->cl_auth = + authdes_pk_create (netname, &serv->pkey, 300, NULL, &ckey); if (!dbp->clnt->cl_auth) dbp->clnt->cl_auth = authunix_create_default (); } @@ -177,7 +252,8 @@ libnsl_hidden_def (__nisbind_connect) nis_error __nisbind_create (dir_binding *dbp, const nis_server *serv_val, - unsigned int serv_len, unsigned int flags) + unsigned int serv_len, unsigned int server_used, + unsigned int current_ep, unsigned int flags) { dbp->clnt = NULL; @@ -203,8 +279,16 @@ __nisbind_create (dir_binding *dbp, cons dbp->trys = 1; dbp->class = -1; - if (__nis_findfastest (dbp) < 1) - return NIS_NAMEUNREACHABLE; + if (server_used == ~0) + { + if (__nis_findfastest (dbp) < 1) + return NIS_NAMEUNREACHABLE; + } + else + { + dbp->server_used = server_used; + dbp->current_ep = current_ep; + } return NIS_SUCCESS; } @@ -306,7 +390,7 @@ __do_niscall2 (const nis_server *server, if (flags & MASTER_ONLY) server_len = 1; - status = __nisbind_create (&dbp, server, server_len, flags); + status = __nisbind_create (&dbp, server, server_len, ~0, ~0, flags); if (status != NIS_SUCCESS) return status; @@ -338,9 +422,7 @@ rec_dirsearch (const_nis_name name, dire case HIGHER_NAME: { /* We need data from a parent domain */ directory_obj *obj; - char ndomain[strlen (dir->do_name) + 3]; - - nis_domain_of_r (dir->do_name, ndomain, sizeof (ndomain)); + const char *ndomain = __nis_domain_of (dir->do_name); /* The root server of our domain is a replica of the parent domain ! (Now I understand why a root server must be a @@ -384,7 +466,7 @@ rec_dirsearch (const_nis_name name, dire size_t namelen = strlen (name); char leaf[namelen + 3]; char domain[namelen + 3]; - char ndomain[namelen + 3]; + const char *ndomain; char *cp; strcpy (domain, name); @@ -397,8 +479,8 @@ rec_dirsearch (const_nis_name name, dire return NULL; } nis_leaf_of_r (domain, leaf, sizeof (leaf)); - nis_domain_of_r (domain, ndomain, sizeof (ndomain)); - strcpy (domain, ndomain); + ndomain = __nis_domain_of (domain); + memmove (domain, ndomain, strlen (ndomain) + 1); } while (nis_dir_cmp (domain, dir->do_name) != SAME_NAME); @@ -451,29 +533,16 @@ rec_dirsearch (const_nis_name name, dire /* We try to query the current server for the searched object, maybe he know about it ? */ static directory_obj * -first_shoot (const_nis_name name, int search_parent_first, directory_obj *dir) +first_shoot (const_nis_name name, directory_obj *dir) { directory_obj *obj = NULL; fd_result *fd_res; XDR xdrs; - char domain[strlen (name) + 3]; -#if 0 if (nis_dir_cmp (name, dir->do_name) == SAME_NAME) return dir; -#endif - - const char *search_name = name; - if (search_parent_first) - { - nis_domain_of_r (name, domain, sizeof (domain)); - search_name = domain; - } - - if (nis_dir_cmp (search_name, dir->do_name) == SAME_NAME) - return dir; - fd_res = __nis_finddirectory (dir, search_name); + fd_res = __nis_finddirectory (dir, name); if (fd_res == NULL) return NULL; if (fd_res->status == NIS_SUCCESS @@ -499,42 +568,224 @@ first_shoot (const_nis_name name, int se return obj; } +static struct nis_server_cache +{ + int search_parent; + int uses; + unsigned int size; + unsigned int server_used; + unsigned int current_ep; + time_t expires; + char name[]; +} *nis_server_cache[16]; +static time_t nis_cold_start_mtime; +__libc_lock_define_initialized (static, nis_server_cache_lock) + +static directory_obj * +nis_server_cache_search (const_nis_name name, int search_parent, + unsigned int *server_used, unsigned int *current_ep, + struct timeval *now) +{ + directory_obj *ret = NULL; + int i; + char *addr; + XDR xdrs; + struct stat64 st; + + if (stat64 ("/var/nis/NIS_COLD_START", &st) < 0) + st.st_mtime = nis_cold_start_mtime + 1; + + __libc_lock_lock (nis_server_cache_lock); + + for (i = 0; i < 16; ++i) + if (nis_server_cache[i] == NULL) + continue; + else if (st.st_mtime != nis_cold_start_mtime + || now->tv_sec > nis_server_cache[i]->expires) + { + free (nis_server_cache[i]); + nis_server_cache[i] = NULL; + } + else if (nis_server_cache[i]->search_parent == search_parent + && strcmp (nis_server_cache[i]->name, name) == 0) + { + ret = calloc (1, sizeof (directory_obj)); + if (ret == NULL) + break; + + addr = rawmemchr (nis_server_cache[i]->name, '\0') + 8; + addr = (char *) ((uintptr_t) addr & ~(uintptr_t) 7); + xdrmem_create (&xdrs, addr, nis_server_cache[i]->size, XDR_DECODE); + if (!_xdr_directory_obj (&xdrs, ret)) + { + xdr_destroy (&xdrs); + free (ret); + ret = NULL; + free (nis_server_cache[i]); + nis_server_cache[i] = NULL; + break; + } + xdr_destroy (&xdrs); + *server_used = nis_server_cache[i]->server_used; + *current_ep = nis_server_cache[i]->current_ep; + break; + } + + nis_cold_start_mtime = st.st_mtime; + + __libc_lock_unlock (nis_server_cache_lock); + return ret; +} + +static void +nis_server_cache_add (const_nis_name name, int search_parent, + directory_obj *dir, unsigned int server_used, + unsigned int current_ep, struct timeval *now) +{ + struct nis_server_cache **loc; + struct nis_server_cache *new; + struct nis_server_cache *old; + int i; + char *addr; + unsigned int size; + XDR xdrs; + + if (dir == NULL) + return; + + size = xdr_sizeof ((xdrproc_t) _xdr_directory_obj, (char *) dir); + new = calloc (1, sizeof (*new) + strlen (name) + 8 + size); + if (new == NULL) + return; + new->search_parent = search_parent; + new->uses = 1; + new->expires = now->tv_sec + dir->do_ttl; + new->size = size; + new->server_used = server_used; + new->current_ep = current_ep; + addr = stpcpy (new->name, name) + 8; + addr = (char *) ((uintptr_t) addr & ~(uintptr_t) 7); + + xdrmem_create(&xdrs, addr, size, XDR_ENCODE); + if (!_xdr_directory_obj (&xdrs, dir)) + { + xdr_destroy (&xdrs); + free (new); + return; + } + xdr_destroy (&xdrs); + + __libc_lock_lock (nis_server_cache_lock); + + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) + for (i = 1; i < 16; ++i) + if (nis_server_cache[i] == NULL) + { + loc = &nis_server_cache[i]; + break; + } + else if ((*loc)->uses > nis_server_cache[i]->uses + || ((*loc)->uses == nis_server_cache[i]->uses + && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; + old = *loc; + *loc = new; + + __libc_lock_unlock (nis_server_cache_lock); + free (old); +} + nis_error -__nisfind_server (const_nis_name name, int search_parent_first, - directory_obj **dir) +__nisfind_server (const_nis_name name, int search_parent, + directory_obj **dir, dir_binding *dbp, unsigned int flags) { + nis_error result = NIS_SUCCESS; + nis_error status; + directory_obj *obj; + struct timeval now; + unsigned int server_used = ~0; + unsigned int current_ep = ~0; + if (name == NULL) return NIS_BADNAME; -#if 0 - /* Search in local cache. In the moment, we ignore the fastest server */ - if (!(flags & NO_CACHE)) - dir = __nis_cache_search (name, flags, &cinfo); -#endif + if (*dir != NULL) + return NIS_SUCCESS; - nis_error result = NIS_SUCCESS; - if (*dir == NULL) + (void) gettimeofday (&now, NULL); + + if ((flags & NO_CACHE) == 0) + *dir = nis_server_cache_search (name, search_parent, &server_used, + ¤t_ep, &now); + if (*dir != NULL) { - nis_error status; - directory_obj *obj; + unsigned int server_len = (*dir)->do_servers.do_servers_len; + if (flags & MASTER_ONLY) + { + server_len = 1; + if (server_used != 0) + { + server_used = ~0; + current_ep = ~0; + } + } + result = __nisbind_create (dbp, (*dir)->do_servers.do_servers_val, + server_len, server_used, current_ep, flags); + if (result != NIS_SUCCESS) + { + nis_free_directory (*dir); + *dir = NULL; + } + return result; + } - *dir = readColdStartFile (); - if (*dir == NULL) - /* No /var/nis/NIS_COLD_START->no NIS+ installed. */ - return NIS_UNAVAIL; + *dir = readColdStartFile (); + if (*dir == NULL) + /* No /var/nis/NIS_COLD_START->no NIS+ installed. */ + return NIS_UNAVAIL; - /* Try at first, if servers in "dir" know our object */ - obj = first_shoot (name, search_parent_first, *dir); + /* Try at first, if servers in "dir" know our object */ + const char *search_name = name; + if (search_parent) + search_name = __nis_domain_of (name); + obj = first_shoot (search_name, *dir); + if (obj == NULL) + { + obj = rec_dirsearch (search_name, *dir, &status); if (obj == NULL) + result = status; + } + + if (result == NIS_SUCCESS) + { + unsigned int server_len = obj->do_servers.do_servers_len; + if (flags & MASTER_ONLY) + server_len = 1; + result = __nisbind_create (dbp, obj->do_servers.do_servers_val, + server_len, ~0, ~0, flags); + if (result == NIS_SUCCESS) { - obj = rec_dirsearch (name, *dir, &status); - if (obj == NULL) - result = status; + if ((flags & MASTER_ONLY) == 0 + || obj->do_servers.do_servers_len == 1) + { + server_used = dbp->server_used; + current_ep = dbp->current_ep; + } + if ((flags & NO_CACHE) == 0) + nis_server_cache_add (name, search_parent, obj, + server_used, current_ep, &now); + } + else + { + nis_free_directory (obj); + obj = NULL; } - - *dir = obj; } + *dir = obj; + return result; } @@ -543,38 +794,19 @@ nis_error __prepare_niscall (const_nis_name name, directory_obj **dirp, dir_binding *bptrp, unsigned int flags) { - nis_error retcode = __nisfind_server (name, 1, dirp); + nis_error retcode = __nisfind_server (name, 1, dirp, bptrp, flags); if (__builtin_expect (retcode != NIS_SUCCESS, 0)) return retcode; - nis_server *server; - u_int server_len; - - if (flags & MASTER_ONLY) - { - server = (*dirp)->do_servers.do_servers_val; - server_len = 1; - } - else - { - server = (*dirp)->do_servers.do_servers_val; - server_len = (*dirp)->do_servers.do_servers_len; - } - - retcode = __nisbind_create (bptrp, server, server_len, flags); - if (retcode == NIS_SUCCESS) - { - do - if (__nisbind_connect (bptrp) == NIS_SUCCESS) - return NIS_SUCCESS; - while (__nisbind_next (bptrp) == NIS_SUCCESS); - - __nisbind_destroy (bptrp); - memset (bptrp, '\0', sizeof (*bptrp)); + do + if (__nisbind_connect (bptrp) == NIS_SUCCESS) + return NIS_SUCCESS; + while (__nisbind_next (bptrp) == NIS_SUCCESS); - retcode = NIS_NAMEUNREACHABLE; - } + __nisbind_destroy (bptrp); + memset (bptrp, '\0', sizeof (*bptrp)); + retcode = NIS_NAMEUNREACHABLE; nis_free_directory (*dirp); *dirp = NULL; diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_defaults.c glibc-2.5-branch/nis/nis_defaults.c --- glibc-2.5/nis/nis_defaults.c 2006-05-09 19:54:46.000000000 -0700 +++ glibc-2.5-branch/nis/nis_defaults.c 2007-01-12 09:05:59.000000000 -0800 @@ -447,7 +447,7 @@ __nis_default_access (char *param, unsig { cptr = getenv ("NIS_DEFAULTS"); if (cptr != NULL && strstr (cptr, "access=") != NULL) - result = searchaccess (getenv ("NIS_DEFAULTS"), result); + result = searchaccess (cptr, result); } return result; diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_domain_of.c glibc-2.5-branch/nis/nis_domain_of.c --- glibc-2.5/nis/nis_domain_of.c 2001-07-05 21:55:36.000000000 -0700 +++ glibc-2.5-branch/nis/nis_domain_of.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997 Free Software Foundation, Inc. +/* Copyright (c) 1997, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -26,3 +26,17 @@ nis_domain_of (const_nis_name name) return nis_domain_of_r (name, result, NIS_MAXNAMELEN); } + +const_nis_name +__nis_domain_of (const_nis_name name) +{ + const_nis_name cptr = strchr (name, '.'); + + if (cptr++ == NULL) + return ""; + + if (*cptr == '\0') + return "."; + + return cptr; +} diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_lookup.c glibc-2.5-branch/nis/nis_lookup.c --- glibc-2.5/nis/nis_lookup.c 2006-08-07 09:02:48.000000000 -0700 +++ glibc-2.5-branch/nis/nis_lookup.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997-1999, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1997-1999, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -74,7 +75,6 @@ nis_lookup (const_nis_name name, const u { static const struct timeval RPCTIMEOUT = {10, 0}; enum clnt_stat result; - char ndomain[strlen (req.ns_name) + 1]; again: result = clnt_call (bptr.clnt, NIS_LOOKUP, @@ -127,27 +127,18 @@ nis_lookup (const_nis_name name, const u /* Otherwise __nisfind_server will not do anything. */ dir = NULL; - if (__nisfind_server (req.ns_name, 1, &dir) + if (__nisfind_server (req.ns_name, 1, &dir, &bptr, + flags & ~MASTER_ONLY) != NIS_SUCCESS) goto out; - - if (__nisbind_create (&bptr, - dir->do_servers.do_servers_val, - dir->do_servers.do_servers_len, - flags) != NIS_SUCCESS) - { - nis_free_directory (dir); - goto out; - } } else if (__nisbind_next (&bptr) != NIS_SUCCESS) { /* No more servers to search. Try parent. */ - nis_domain_of_r (req.ns_name, ndomain, - sizeof (ndomain)); + const char *ndomain = __nis_domain_of (req.ns_name); req.ns_name = strdupa (ndomain); - if (strcmp (ndomain, ".") == 0) + if (strcmp (req.ns_name, ".") == 0) { NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; goto out; diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_subr.c glibc-2.5-branch/nis/nis_subr.c --- glibc-2.5/nis/nis_subr.c 2006-06-16 15:30:02.000000000 -0700 +++ glibc-2.5-branch/nis/nis_subr.c 2007-01-12 06:57:15.000000000 -0800 @@ -251,13 +251,16 @@ nis_getnames (const_nis_name name) { char *p; - tmp = malloc (cplen + name_len + 2); + tmp = malloc (cplen + name_len + 3); if (__builtin_expect (tmp == NULL, 0)) goto free_null; - p = __stpcpy (tmp, name); + p = __mempcpy (tmp, name, name_len); *p++ = '.'; - memcpy (p, cp, cplen + 1); + p = __mempcpy (p, cp, cplen); + if (p[-1] != '.') + *p++ = '.'; + *p = '\0'; } if (pos >= count) @@ -275,6 +278,13 @@ nis_getnames (const_nis_name name) cp = __strtok_r (NULL, ":", &saveptr); } + if (pos == 0 + && __asprintf (&getnames[pos++], "%s%s%s%s", + name, name[name_len - 1] == '.' ? "" : ".", + local_domain, + local_domain[local_domain_len - 1] == '.' ? "" : ".") < 0) + goto free_null; + getnames[pos] = NULL; return getnames; diff -pNur -x CVS -x libidn glibc-2.5/nis/nis_table.c glibc-2.5-branch/nis/nis_table.c --- glibc-2.5/nis/nis_table.c 2006-08-07 09:01:44.000000000 -0700 +++ glibc-2.5-branch/nis/nis_table.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (c) 1997-1999,2003,2004,2005,2006 Free Software Foundation, Inc. +/* Copyright (c) 1997-1999, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -215,6 +216,7 @@ nis_list (const_nis_name name, unsigned char *tableptr; char *tablepath = NULL; int first_try = 0; /* Do we try the old binding at first ? */ + nis_result *allres = NULL; if (res == NULL) return NULL; @@ -223,6 +225,7 @@ nis_list (const_nis_name name, unsigned { status = NIS_BADNAME; err_out: + nis_freeresult (allres); memset (res, '\0', sizeof (nis_result)); NIS_RES_STATUS (res) = status; return res; @@ -272,21 +275,14 @@ nis_list (const_nis_name name, unsigned memset (res, '\0', sizeof (nis_result)); status = __nisfind_server (ibreq->ibr_name, - ibreq->ibr_srch.ibr_srch_val != NULL, &dir); + ibreq->ibr_srch.ibr_srch_val != NULL, + &dir, &bptr, flags & ~MASTER_ONLY); if (status != NIS_SUCCESS) { NIS_RES_STATUS (res) = status; goto fail3; } - status = __nisbind_create (&bptr, dir->do_servers.do_servers_val, - dir->do_servers.do_servers_len, flags); - if (__builtin_expect (status != NIS_SUCCESS, 0)) - { - NIS_RES_STATUS (res) = status; - goto fail2; - } - while (__nisbind_connect (&bptr) != NIS_SUCCESS) if (__builtin_expect (__nisbind_next (&bptr) != NIS_SUCCESS, 0)) { @@ -336,7 +332,6 @@ nis_list (const_nis_name name, unsigned NIS_RES_STATUS (res) = NIS_NOMEMORY; fail: __nisbind_destroy (&bptr); - fail2: nis_free_directory (dir); fail3: free (tablepath); @@ -349,6 +344,7 @@ nis_list (const_nis_name name, unsigned if (names != namebuf) nis_freenames (names); nis_free_request (ibreq); + nis_freeresult (allres); return res; } if (NIS_RES_OBJECT (res)->LI_data.li_attrs.li_attrs_len) @@ -392,6 +388,57 @@ nis_list (const_nis_name name, unsigned goto again; } } + else if ((flags & (FOLLOW_PATH | ALL_RESULTS)) + == (FOLLOW_PATH | ALL_RESULTS)) + { + if (allres == NULL) + { + allres = res; + res = malloc (sizeof (nis_result)); + if (res == NULL) + { + res = allres; + allres = NULL; + NIS_RES_STATUS (res) = NIS_NOMEMORY; + goto fail; + } + NIS_RES_STATUS (res) = NIS_RES_STATUS (allres); + } + else + { + nis_object *objects_val + = realloc (NIS_RES_OBJECT (allres), + (NIS_RES_NUMOBJ (allres) + + NIS_RES_NUMOBJ (res)) + * sizeof (nis_object)); + if (objects_val == NULL) + { + NIS_RES_STATUS (res) = NIS_NOMEMORY; + goto fail; + } + NIS_RES_OBJECT (allres) = objects_val; + memcpy (NIS_RES_OBJECT (allres) + NIS_RES_NUMOBJ (allres), + NIS_RES_OBJECT (res), + NIS_RES_NUMOBJ (res) * sizeof (nis_object)); + NIS_RES_NUMOBJ (allres) += NIS_RES_NUMOBJ (res); + NIS_RES_NUMOBJ (res) = 0; + free (NIS_RES_OBJECT (res)); + NIS_RES_OBJECT (res) = NULL; + NIS_RES_STATUS (allres) = NIS_RES_STATUS (res); + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) res); + } + clnt_status = __follow_path (&tablepath, &tableptr, ibreq, + &bptr); + if (clnt_status != NIS_SUCCESS) + { + /* Prepare for the nis_freeresult call. */ + memset (res, '\0', sizeof (*res)); + + if (clnt_status == NIS_NOMEMORY) + NIS_RES_STATUS (allres) = clnt_status; + ++done; + } + } else ++done; break; @@ -485,6 +532,12 @@ nis_list (const_nis_name name, unsigned nis_free_request (ibreq); + if (allres) + { + nis_freeresult (res); + return allres; + } + return res; } libnsl_hidden_def (nis_list) diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_compat/compat-grp.c glibc-2.5-branch/nis/nss_compat/compat-grp.c --- glibc-2.5/nis/nss_compat/compat-grp.c 2006-07-31 16:33:04.000000000 -0700 +++ glibc-2.5-branch/nis/nss_compat/compat-grp.c 2007-01-12 09:59:51.000000000 -0800 @@ -580,13 +580,17 @@ internal_getgrgid_r (gid_t gid, struct g /* +group */ if (result->gr_name[0] == '+' && result->gr_name[1] != '\0') { + /* Yes, no +1, see the memcpy call below. */ + size_t len = strlen (result->gr_name); + char buf[len]; enum nss_status status; /* Store the group in the blacklist for the "+" at the end of /etc/group */ - blacklist_store_name (&result->gr_name[1], ent); + memcpy (buf, &result->gr_name[1], len); status = getgrnam_plusgroup (&result->gr_name[1], result, ent, buffer, buflen, errnop); + blacklist_store_name (buf, ent); if (status == NSS_STATUS_SUCCESS && result->gr_gid == gid) break; else diff -pNur -x CVS -x libidn glibc-2.5/nis/nss-default.c glibc-2.5-branch/nis/nss-default.c --- glibc-2.5/nis/nss-default.c 2006-04-28 14:03:17.000000000 -0700 +++ glibc-2.5-branch/nis/nss-default.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2001, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include #include #include #include @@ -54,6 +55,7 @@ static const struct static void init (void) { + int saved_errno = errno; FILE *fp = fopen (default_nss, "rc"); if (fp != NULL) { @@ -111,6 +113,7 @@ init (void) fclose (fp); } + __set_errno (saved_errno); } diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nis/nis-hosts.c glibc-2.5-branch/nis/nss_nis/nis-hosts.c --- glibc-2.5/nis/nss_nis/nis-hosts.c 2006-04-08 19:08:28.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nis/nis-hosts.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2003, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -134,13 +134,17 @@ internal_nis_gethostent_r (struct hosten if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; + uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data); + buffer += pad; + struct parser_data *data = (void *) buffer; - if (__builtin_expect (buflen < sizeof *data + 1, 0)) + if (__builtin_expect (buflen < sizeof *data + 1 + pad, 0)) { *errnop = ERANGE; *h_errnop = NETDB_INTERNAL; return NSS_STATUS_TRYAGAIN; } + buflen -= pad; /* Get the next entry until we found a correct one. */ const size_t linebuflen = buffer + buflen - data->linebuffer; @@ -234,6 +238,9 @@ internal_gethostbyname2_r (const char *n char *buffer, size_t buflen, int *errnop, int *h_errnop, int flags) { + uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data); + buffer += pad; + struct parser_data *data = (void *) buffer; if (name == NULL) @@ -246,12 +253,13 @@ internal_gethostbyname2_r (const char *n if (yp_get_default_domain (&domain)) return NSS_STATUS_UNAVAIL; - if (buflen < sizeof *data + 1) + if (buflen < sizeof *data + 1 + pad) { *h_errnop = NETDB_INTERNAL; *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } + buflen -= pad; /* Convert name to lowercase. */ size_t namlen = strlen (name); @@ -352,13 +360,17 @@ _nss_nis_gethostbyaddr_r (const void *ad if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; + uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data); + buffer += pad; + struct parser_data *data = (void *) buffer; - if (__builtin_expect (buflen < sizeof *data + 1, 0)) + if (__builtin_expect (buflen < sizeof *data + 1 + pad, 0)) { *errnop = ERANGE; *h_errnop = NETDB_INTERNAL; return NSS_STATUS_TRYAGAIN; } + buflen -= pad; char *buf = inet_ntoa (*(const struct in_addr *) addr); diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nis/nis-service.c glibc-2.5-branch/nis/nss_nis/nis-service.c --- glibc-2.5/nis/nss_nis/nis-service.c 2006-08-19 11:36:25.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nis/nis-service.c 2007-07-12 07:35:54.000000000 -0700 @@ -271,7 +271,7 @@ _nss_nis_getservbyname_r (const char *na /* If the protocol is given, we could try if our NIS server knows about services.byservicename map. If yes, we only need one query. */ - size_t keylen = strlen (name) + 1 + (protocol ? strlen (protocol) : 0); + size_t keylen = strlen (name) + (protocol ? 1 + strlen (protocol) : 0); char key[keylen + 1]; /* key is: "name/proto" */ diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-ethers.c glibc-2.5-branch/nis/nss_nisplus/nisplus-ethers.c --- glibc-2.5/nis/nss_nisplus/nisplus-ethers.c 2006-04-29 22:44:23.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-ethers.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -256,7 +257,8 @@ _nss_nisplus_gethostton_r (const char *n snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); - nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); if (result == NULL) { @@ -322,7 +324,8 @@ _nss_nisplus_getntohost_r (const struct addr->ether_addr_octet[4], addr->ether_addr_octet[5], tablename_val); - nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-grp.c glibc-2.5-branch/nis/nss_nisplus/nisplus-grp.c --- glibc-2.5/nis/nss_nisplus/nisplus-grp.c 2006-05-20 12:20:19.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-grp.c 2007-01-12 06:37:24.000000000 -0800 @@ -46,13 +46,13 @@ static char *tableptr; static netobj cursor; -static nis_name tablename_val; -static size_t tablename_len; +nis_name grp_tablename_val attribute_hidden; +size_t grp_tablename_len attribute_hidden; -static enum nss_status -_nss_create_tablename (int *errnop) +enum nss_status +_nss_grp_create_tablename (int *errnop) { - if (tablename_val == NULL) + if (grp_tablename_val == NULL) { const char *local_dir = nis_local_directory (); size_t local_dir_len = strlen (local_dir); @@ -67,11 +67,16 @@ _nss_create_tablename (int *errnop) memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); - tablename_len = sizeof (prefix) - 1 + local_dir_len; + grp_tablename_len = sizeof (prefix) - 1 + local_dir_len; atomic_write_barrier (); - tablename_val = p; + if (atomic_compare_and_exchange_bool_acq (&grp_tablename_val, p, NULL)) + { + /* Another thread already installed the value. */ + free (p); + grp_tablename_len = strlen (grp_tablename_val); + } } return NSS_STATUS_SUCCESS; @@ -103,19 +108,19 @@ internal_setgrent (int *errnop) { enum nss_status status = NSS_STATUS_SUCCESS; - if (tablename_val == NULL) - status = _nss_create_tablename (errnop); + if (grp_tablename_val == NULL) + status = _nss_grp_create_tablename (errnop); if (status == NSS_STATUS_SUCCESS) { - ibreq = __create_ib_request (tablename_val, 0); + ibreq = __create_ib_request (grp_tablename_val, 0); if (ibreq == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - nis_error retcode = __prepare_niscall (tablename_val, &dir, &bptr, 0); + nis_error retcode = __prepare_niscall (grp_tablename_val, &dir, &bptr, 0); if (retcode != NIS_SUCCESS) { nis_free_request (ibreq); @@ -285,13 +290,9 @@ _nss_nisplus_getgrnam_r (const char *nam { int parse_res; - if (tablename_val == NULL) + if (grp_tablename_val == NULL) { - __libc_lock_lock (lock); - - enum nss_status status = _nss_create_tablename (errnop); - - __libc_lock_unlock (lock); + enum nss_status status = _nss_grp_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; @@ -304,10 +305,10 @@ _nss_nisplus_getgrnam_r (const char *nam } nis_result *result; - char buf[strlen (name) + 9 + tablename_len]; + char buf[strlen (name) + 9 + grp_tablename_len]; int olderr = errno; - snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + snprintf (buf, sizeof (buf), "[name=%s],%s", name, grp_tablename_val); result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); @@ -348,13 +349,9 @@ enum nss_status _nss_nisplus_getgrgid_r (const gid_t gid, struct group *gr, char *buffer, size_t buflen, int *errnop) { - if (tablename_val == NULL) + if (grp_tablename_val == NULL) { - __libc_lock_lock (lock); - - enum nss_status status = _nss_create_tablename (errnop); - - __libc_lock_unlock (lock); + enum nss_status status = _nss_grp_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; @@ -362,11 +359,11 @@ _nss_nisplus_getgrgid_r (const gid_t gid int parse_res; nis_result *result; - char buf[8 + 3 * sizeof (unsigned long int) + tablename_len]; + char buf[8 + 3 * sizeof (unsigned long int) + grp_tablename_len]; int olderr = errno; snprintf (buf, sizeof (buf), "[gid=%lu],%s", - (unsigned long int) gid, tablename_val); + (unsigned long int) gid, grp_tablename_val); result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-initgroups.c glibc-2.5-branch/nis/nss_nisplus/nisplus-initgroups.c --- glibc-2.5/nis/nss_nisplus/nisplus-initgroups.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-initgroups.c 2007-01-12 06:37:24.000000000 -0800 @@ -0,0 +1,150 @@ +/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nss-nisplus.h" +#include "nisplus-parser.h" +#include +#include +#include + +#define NISOBJVAL(col, obj) \ + ((obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) + +#define NISOBJLEN(col, obj) \ + ((obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) + +extern nis_name grp_tablename_val attribute_hidden; +extern size_t grp_tablename_len attribute_hidden; +extern enum nss_status _nss_grp_create_tablename (int *errnop); + + +enum nss_status +_nss_nisplus_initgroups_dyn (const char *user, gid_t group, long int *start, + long int *size, gid_t **groupsp, long int limit, + int *errnop) +{ + if (grp_tablename_val == NULL) + { + enum nss_status status = _nss_grp_create_tablename (errnop); + + if (status != NSS_STATUS_SUCCESS) + return status; + } + + nis_result *result; + char buf[strlen (user) + 12 + grp_tablename_len]; + + snprintf (buf, sizeof (buf), "[members=%s],%s", user, grp_tablename_val); + + result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH | ALL_RESULTS, NULL, NULL); + + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } + + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + nis_freeresult (result); + return status; + } + + if (NIS_RES_NUMOBJ (result) == 0) + { + errout: + nis_freeresult (result); + return NSS_STATUS_NOTFOUND; + } + + gid_t *groups = *groupsp; + nis_object *obj = NIS_RES_OBJECT (result); + for (unsigned int cnt = 0; cnt < NIS_RES_NUMOBJ (result); ++cnt, ++obj) + { + if (__type_of (obj) != NIS_ENTRY_OBJ + || strcmp (obj->EN_data.en_type, "group_tbl") != 0 + || obj->EN_data.en_cols.en_cols_len < 4) + continue; + + char *numstr = NISOBJVAL (2, obj); + size_t len = NISOBJLEN (2, obj); + if (len == 0 || numstr[0] == '\0') + continue; + + gid_t gid; + char *endp; + if (__builtin_expect (numstr[len - 1] != '\0', 0)) + { + char numstrbuf[len + 1]; + memcpy (numstrbuf, numstr, len); + numstrbuf[len] = '\0'; + gid = strtoul (numstrbuf, &endp, 10); + if (*endp) + continue; + } + else + { + gid = strtoul (numstr, &endp, 10); + if (*endp) + continue; + } + + if (gid == group) + continue; + + /* Insert this group. */ + if (*start == *size) + { + /* Need a bigger buffer. */ + long int newsize; + + if (limit > 0 && *size == limit) + /* We reached the maximum. */ + break; + + if (limit <= 0) + newsize = 2 * *size; + else + newsize = MIN (limit, 2 * *size); + + gid_t *newgroups = realloc (groups, newsize * sizeof (*groups)); + if (newgroups == NULL) + goto errout; + *groupsp = groups = newgroups; + *size = newsize; + } + + groups[*start] = gid; + *start += 1; + } + + nis_freeresult (result); + return NSS_STATUS_SUCCESS; +} diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-network.c glibc-2.5-branch/nis/nss_nisplus/nisplus-network.c --- glibc-2.5/nis/nss_nisplus/nisplus-network.c 2006-04-29 22:44:23.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-network.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -338,7 +339,7 @@ _nss_nisplus_getnetbyname_r (const char /* Search at first in the alias list, and use the correct name for the next search */ snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); - result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM, NULL, NULL); if (result != NULL) { @@ -366,7 +367,8 @@ _nss_nisplus_getnetbyname_r (const char } nis_freeresult (result); - result = nis_list (bufptr, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + result = nis_list (bufptr, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM, + NULL, NULL); } if (result == NULL) @@ -438,7 +440,8 @@ _nss_nisplus_getnetbyaddr_r (uint32_t ad while (1) { snprintf (buf, sizeof (buf), "[addr=%s],%s", buf2, tablename_val); - nis_result *result = nis_list (buf, EXPAND_NAME, NULL, NULL); + nis_result *result = nis_list (buf, EXPAND_NAME | USE_DGRAM, + NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-pwd.c glibc-2.5-branch/nis/nss_nisplus/nisplus-pwd.c --- glibc-2.5/nis/nss_nisplus/nisplus-pwd.c 2006-05-20 12:20:19.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-pwd.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006 +/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -311,7 +311,7 @@ _nss_nisplus_getpwnam_r (const char *nam snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL); if (result == NULL) { @@ -370,7 +370,7 @@ _nss_nisplus_getpwuid_r (const uid_t uid snprintf (buf, sizeof (buf), "[uid=%lu],%s", (unsigned long int) uid, pwd_tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-rpc.c glibc-2.5-branch/nis/nss_nisplus/nisplus-rpc.c --- glibc-2.5/nis/nss_nisplus/nisplus-rpc.c 2006-04-29 22:44:23.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-rpc.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006 +/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -315,7 +315,8 @@ _nss_nisplus_getrpcbyname_r (const char /* Search at first in the alias list, and use the correct name for the next search */ snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); - nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); if (result != NULL) { @@ -342,7 +343,8 @@ _nss_nisplus_getrpcbyname_r (const char } nis_freeresult (result); - result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS , NULL, NULL); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); } if (result == NULL) @@ -402,7 +404,8 @@ _nss_nisplus_getrpcbynumber_r (const int snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val); - nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM, + NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-service.c glibc-2.5-branch/nis/nss_nisplus/nisplus-service.c --- glibc-2.5/nis/nss_nisplus/nisplus-service.c 2006-04-29 22:44:23.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-service.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006 +/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -322,7 +322,8 @@ _nss_nisplus_getservbyname_r (const char for the next search */ snprintf (buf, sizeof (buf), "[name=%s,proto=%s],%s", name, protocol, tablename_val); - nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); if (result != NULL) { @@ -351,7 +352,8 @@ _nss_nisplus_getservbyname_r (const char } nis_freeresult (result); - result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); } if (result == NULL) @@ -420,7 +422,8 @@ _nss_nisplus_getservbyport_r (const int snprintf (buf, sizeof (buf), "[port=%d,proto=%s],%s", number, protocol, tablename_val); - nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, + NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/nss_nisplus/nisplus-spwd.c glibc-2.5-branch/nis/nss_nisplus/nisplus-spwd.c --- glibc-2.5/nis/nss_nisplus/nisplus-spwd.c 2006-04-29 22:44:23.000000000 -0700 +++ glibc-2.5-branch/nis/nss_nisplus/nisplus-spwd.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -182,7 +183,7 @@ _nss_nisplus_getspnam_r (const char *nam snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL); if (result == NULL) { diff -pNur -x CVS -x libidn glibc-2.5/nis/rpcsvc/nislib.h glibc-2.5-branch/nis/rpcsvc/nislib.h --- glibc-2.5/nis/rpcsvc/nislib.h 2006-08-07 09:01:48.000000000 -0700 +++ glibc-2.5-branch/nis/rpcsvc/nislib.h 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -272,12 +272,13 @@ struct dir_binding typedef struct dir_binding dir_binding; extern nis_error __nisbind_create (dir_binding *, const nis_server *, - unsigned int, unsigned int) __THROW; + unsigned int, unsigned int, unsigned int, + unsigned int) __THROW; extern nis_error __nisbind_connect (dir_binding *) __THROW; extern nis_error __nisbind_next (dir_binding *) __THROW; extern void __nisbind_destroy (dir_binding *) __THROW; -extern nis_error __nisfind_server (const_nis_name, int, directory_obj **) - __THROW; +extern nis_error __nisfind_server (const_nis_name, int, directory_obj **, + dir_binding *, unsigned int) __THROW; #endif diff -pNur -x CVS -x libidn glibc-2.5/nis/Versions glibc-2.5-branch/nis/Versions --- glibc-2.5/nis/Versions 2006-05-20 12:21:52.000000000 -0700 +++ glibc-2.5-branch/nis/Versions 2007-01-12 06:37:24.000000000 -0800 @@ -125,6 +125,6 @@ libnss_nisplus { _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent; _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent; _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent; - _nss_nisplus_setspent; + _nss_nisplus_setspent; _nss_nisplus_initgroups_dyn; } } diff -pNur -x CVS -x libidn glibc-2.5/nptl/allocatestack.c glibc-2.5-branch/nptl/allocatestack.c --- glibc-2.5/nptl/allocatestack.c 2006-08-23 10:39:47.000000000 -0700 +++ glibc-2.5-branch/nptl/allocatestack.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -982,3 +982,60 @@ __pthread_init_static_tls (struct link_m lll_unlock (stack_cache_lock); } + + +void +attribute_hidden +__wait_lookup_done (void) +{ + lll_lock (stack_cache_lock); + + struct pthread *self = THREAD_SELF; + + /* Iterate over the list with system-allocated threads first. */ + list_t *runp; + list_for_each (runp, &stack_used) + { + struct pthread *t = list_entry (runp, struct pthread, list); + if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED) + continue; + + int *const gscope_flagp = &t->header.gscope_flag; + + /* We have to wait until this thread is done with the global + scope. First tell the thread that we are waiting and + possibly have to be woken. */ + if (atomic_compare_and_exchange_bool_acq (gscope_flagp, + THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_FLAG_USED)) + continue; + + do + lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT); + while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT); + } + + /* Now the list with threads using user-allocated stacks. */ + list_for_each (runp, &__stack_user) + { + struct pthread *t = list_entry (runp, struct pthread, list); + if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED) + continue; + + int *const gscope_flagp = &t->header.gscope_flag; + + /* We have to wait until this thread is done with the global + scope. First tell the thread that we are waiting and + possibly have to be woken. */ + if (atomic_compare_and_exchange_bool_acq (gscope_flagp, + THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_FLAG_USED)) + continue; + + do + lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT); + while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT); + } + + lll_unlock (stack_cache_lock); +} diff -pNur -x CVS -x libidn glibc-2.5/nptl/ChangeLog glibc-2.5-branch/nptl/ChangeLog --- glibc-2.5/nptl/ChangeLog 2006-09-24 10:14:11.000000000 -0700 +++ glibc-2.5-branch/nptl/ChangeLog 2007-07-12 08:40:54.000000000 -0700 @@ -1,3 +1,212 @@ +2007-06-22 Jakub Jelinek + + * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and + cpusetsize if pthread_getaffinity_np failed with ENOSYS. + +2007-05-28 Jakub Jelinek + + * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit + insn suffix. + (THREAD_GSCOPE_GET_FLAG): Remove. + * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove. + * allocatestack.c (__wait_lookup_done): Revert 2007-05-24 + changes. + * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag. + (THREAD_GSCOPE_GET_FLAG): Remove. + (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag + instead of THREAD_GSCOPE_GET_FLAG. + (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after + it. + * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + +2007-05-24 Richard Henderson + + * descr.h (struct pthread): Add header.gscope_flag. + * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + +2007-05-26 Ulrich Drepper + + * allocatestack.c: Revert last change. + * init.c: Likewise. + * sysdeps/i386/tls.h: Likewise. + * sysdeps/x86_64/tls.h: Likewise. + +2007-05-24 Jakub Jelinek + + * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag. + (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, + THREAD_GSCOPE_FLAG_WAIT): Define. + (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define. + * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use + PTR_DEMANGLE. + (THREAD_GSCOPE_GET_FLAG): Define. + * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define. + * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG + instead of ->header.gscope_flag directly. + +2007-05-21 Ulrich Drepper + + * sysdeps/pthread/pthread-functions.h (struct pthread_functions): + Remove ptr_wait_lookup_done again. + * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here. + (__pthread_initialize_minimal_internal): Initialize + _dl_wait_lookup_done pointer in _rtld_global directly. + * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): + Remove code to code _dl_wait_lookup_done. + * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not + encrypted for now. + +2007-05-19 Ulrich Drepper + + * allocatestack.c (__wait_lookup_done): New function. + * sysdeps/pthread/pthread-functions.h (struct pthread_functions): + Add ptr_wait_lookup_done. + * init.c (pthread_functions): Initialize .ptr_wait_lookup_done. + * pthreadP.h: Declare __wait_lookup_done. + * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag. + Define macros to implement reference handling of global scope. + * sysdeps/x86_64/tls.h: Likewise. + * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): + Initialize GL(dl_wait_lookup_done). + +2006-12-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/rtld-lowlevel.h + (__rtld_mrlock_initialize): Add missing closing parenthesis. + +2006-10-29 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): + Define. + (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld. + * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. + +2006-10-27 Jakub Jelinek + + * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock, + __rtld_mrlock_change): Update oldval if atomic compare and exchange + failed. + + * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): + Define to THREAD_SELF->header.multiple_threads. + * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + +2006-10-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file.. + +2007-05-25 Ulrich Drepper + + * Makefile (tests): Add tst-sem10. + * tst-sem10.c: New file. + +2007-05-25 Ulrich Drepper + Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): + Move __pthread_enable_asynccancel right before futex syscall. + * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): + Likewise. + +2007-05-21 Jakub Jelinek + + * tst-robust9.c (do_test): Don't fail if ENABLE_PI and + pthread_mutex_init failed with ENOTSUP. + +2007-05-17 Ulrich Drepper + + [BZ #4512] + * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner + is detected. + * pthread_mutex_timedlock.c: Likewise. + * pthread_mutex_trylock.c: Likewise. + Patch in part by Atsushi Nemoto . + + * Makefile (tests): Add tst-robust9 and tst-robustpi9. + * tst-robust9.c: New file. + * tst-robustpi9.c: New file. + +2007-05-07 Ulrich Drepper + + * sysdeps/unix/sysv/linux/lowlevelrobustlock.c + (__lll_robust_lock_wait): Fix race caused by reloading of futex value. + (__lll_robust_timedlock_wait): Likewise. + Reported by Alexey Kuznetsov . + +2007-05-06 Mike Frysinger + + [BZ #4465] + * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1. + * tst-cancel4.c (tf_fdatasync): New test. + +2007-02-25 Ulrich Drepper + + * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in + new thread, don't just decrement it. + Patch by Suzuki K P . + +2007-02-09 Jakub Jelinek + + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S + (__lll_mutex_timedlock_wait): Use correct pointer when we don't + call into the kernel to delay. + +2006-12-28 David S. Miller + + * shlib-versions: Fix sparc64 linux target specification. + +2006-12-21 Jakub Jelinek + + * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure + tid isn't reread from pd->tid in between ESRCH test and the syscall. + 2006-09-24 Ulrich Drepper [BZ #3251] diff -pNur -x CVS -x libidn glibc-2.5/nptl/descr.h glibc-2.5-branch/nptl/descr.h --- glibc-2.5/nptl/descr.h 2006-09-24 10:10:55.000000000 -0700 +++ glibc-2.5-branch/nptl/descr.h 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -131,6 +131,7 @@ struct pthread struct { int multiple_threads; + int gscope_flag; } header; #endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/init.c glibc-2.5-branch/nptl/init.c --- glibc-2.5/nptl/init.c 2006-08-23 10:41:31.000000000 -0700 +++ glibc-2.5-branch/nptl/init.c 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -386,6 +386,8 @@ __pthread_initialize_minimal_internal (v GL(dl_init_static_tls) = &__pthread_init_static_tls; + GL(dl_wait_lookup_done) = &__wait_lookup_done; + /* Register the fork generation counter with the libc. */ #ifndef TLS_MULTIPLE_THREADS_IN_TCB __libc_multiple_threads_ptr = diff -pNur -x CVS -x libidn glibc-2.5/nptl/Makefile glibc-2.5-branch/nptl/Makefile --- glibc-2.5/nptl/Makefile 2006-09-08 03:40:49.000000000 -0700 +++ glibc-2.5-branch/nptl/Makefile 2007-07-12 09:58:04.000000000 -0700 @@ -1,4 +1,4 @@ -# Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc. +# Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -209,16 +209,16 @@ tests = tst-typesizes \ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ tst-cond20 tst-cond21 tst-cond22 \ tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ - tst-robust6 tst-robust7 tst-robust8 \ - tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 \ - tst-robustpi5 tst-robustpi6 tst-robustpi7 tst-robustpi8 \ + tst-robust6 tst-robust7 tst-robust8 tst-robust9 \ + tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \ + tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \ tst-rwlock1 tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 \ tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 \ tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \ tst-once1 tst-once2 tst-once3 tst-once4 \ tst-key1 tst-key2 tst-key3 tst-key4 \ tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \ - tst-sem8 tst-sem9 \ + tst-sem8 tst-sem9 tst-sem10 \ tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ tst-align tst-align2 tst-align3 \ tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \ diff -pNur -x CVS -x libidn glibc-2.5/nptl/pthread_getattr_np.c glibc-2.5-branch/nptl/pthread_getattr_np.c --- glibc-2.5/nptl/pthread_getattr_np.c 2006-04-06 21:26:42.000000000 -0700 +++ glibc-2.5-branch/nptl/pthread_getattr_np.c 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -168,8 +168,12 @@ pthread_getattr_np (thread_id, attr) { free (cpuset); if (ret == ENOSYS) - /* There is no such functionality. */ - ret = 0; + { + /* There is no such functionality. */ + ret = 0; + iattr->cpuset = NULL; + iattr->cpusetsize = 0; + } } } diff -pNur -x CVS -x libidn glibc-2.5/nptl/pthread_mutex_lock.c glibc-2.5-branch/nptl/pthread_mutex_lock.c --- glibc-2.5/nptl/pthread_mutex_lock.c 2006-08-14 16:01:26.000000000 -0700 +++ glibc-2.5-branch/nptl/pthread_mutex_lock.c 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -127,6 +127,8 @@ __pthread_mutex_lock (mutex) int newval = id; #ifdef NO_INCR newval |= FUTEX_WAITERS; +#else + newval |= (oldval & FUTEX_WAITERS); #endif newval diff -pNur -x CVS -x libidn glibc-2.5/nptl/pthread_mutex_timedlock.c glibc-2.5-branch/nptl/pthread_mutex_timedlock.c --- glibc-2.5/nptl/pthread_mutex_timedlock.c 2006-08-14 16:01:26.000000000 -0700 +++ glibc-2.5-branch/nptl/pthread_mutex_timedlock.c 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -119,9 +119,11 @@ pthread_mutex_timedlock (mutex, abstime) if ((oldval & FUTEX_OWNER_DIED) != 0) { /* The previous owner died. Try locking the mutex. */ - int newval + int newval = id | (oldval & FUTEX_WAITERS); + + newval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, - id, oldval); + newval, oldval); if (newval != oldval) { oldval = newval; diff -pNur -x CVS -x libidn glibc-2.5/nptl/pthread_mutex_trylock.c glibc-2.5-branch/nptl/pthread_mutex_trylock.c --- glibc-2.5/nptl/pthread_mutex_trylock.c 2006-08-14 16:01:26.000000000 -0700 +++ glibc-2.5-branch/nptl/pthread_mutex_trylock.c 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -91,9 +91,11 @@ __pthread_mutex_trylock (mutex) if ((oldval & FUTEX_OWNER_DIED) != 0) { /* The previous owner died. Try locking the mutex. */ - int newval + int newval = id | (oldval & FUTEX_WAITERS); + + newval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, - id, oldval); + newval, oldval); if (newval != oldval) { diff -pNur -x CVS -x libidn glibc-2.5/nptl/pthreadP.h glibc-2.5-branch/nptl/pthreadP.h --- glibc-2.5/nptl/pthreadP.h 2006-08-23 10:42:52.000000000 -0700 +++ glibc-2.5-branch/nptl/pthreadP.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -545,6 +545,8 @@ extern int __nptl_setxid (struct xid_com extern void __free_stack_cache (void) attribute_hidden; +extern void __wait_lookup_done (void) attribute_hidden; + #ifdef SHARED # define PTHREAD_STATIC_FN_REQUIRE(name) #else diff -pNur -x CVS -x libidn glibc-2.5/nptl/shlib-versions glibc-2.5-branch/nptl/shlib-versions --- glibc-2.5/nptl/shlib-versions 2004-07-05 10:03:27.000000000 -0700 +++ glibc-2.5-branch/nptl/shlib-versions 2007-01-12 10:14:34.000000000 -0800 @@ -1,5 +1,5 @@ mips.*-.*-linux.* libpthread=0 GLIBC_2.0 GLIBC_2.2 -sparc64-.*-linux.* libpthread=0 GLIBC_2.2 +sparc64.*-.*-linux.* libpthread=0 GLIBC_2.2 sh.*-.*-linux.* libpthread=0 GLIBC_2.2 ia64.*-.*-linux.* libpthread=0 GLIBC_2.2 hppa.*-.*-linux.* libpthread=0 GLIBC_2.2 diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/alpha/tls.h glibc-2.5-branch/nptl/sysdeps/alpha/tls.h --- glibc-2.5/nptl/sysdeps/alpha/tls.h 2006-01-13 13:38:17.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/alpha/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -124,6 +124,29 @@ typedef struct #define THREAD_SETMEM_NC(descr, member, idx, value) \ descr->member[idx] = (value) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/i386/tls.h glibc-2.5-branch/nptl/sysdeps/i386/tls.h --- glibc-2.5/nptl/sysdeps/i386/tls.h 2005-12-17 22:57:32.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/i386/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/i386 version. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002,2003,2004,2005,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -51,6 +51,7 @@ typedef struct uintptr_t sysinfo; uintptr_t stack_guard; uintptr_t pointer_guard; + int gscope_flag; } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 @@ -434,6 +435,26 @@ union user_desc_init = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) +/* Get and set the global scope generation counter in the TCB head. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res; \ + asm volatile ("xchgl %0, %%gs:%P1" \ + : "=r" (__res) \ + : "i" (offsetof (struct pthread, header.gscope_flag)), \ + "0" (THREAD_GSCOPE_FLAG_UNUSED)); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/ia64/tls.h glibc-2.5-branch/nptl/sysdeps/ia64/tls.h --- glibc-2.5/nptl/sysdeps/ia64/tls.h 2006-01-06 13:46:10.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/ia64/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/IA-64 version. - Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -166,6 +166,29 @@ register struct pthread *__thread_self _ (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-2] \ = THREAD_GET_POINTER_GUARD ()) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/powerpc/tls.h glibc-2.5-branch/nptl/sysdeps/powerpc/tls.h --- glibc-2.5/nptl/sysdeps/powerpc/tls.h 2005-12-19 22:44:40.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/powerpc/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/PowerPC version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -183,6 +183,29 @@ register void *__thread_register __asm__ different value to mean unset l_tls_offset. */ # define NO_TLS_OFFSET -1 +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/s390/tls.h glibc-2.5-branch/nptl/sysdeps/s390/tls.h --- glibc-2.5/nptl/sysdeps/s390/tls.h 2005-12-19 22:46:06.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/s390/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/s390 version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -50,6 +50,7 @@ typedef struct int multiple_threads; uintptr_t sysinfo; uintptr_t stack_guard; + int gscope_flag; } tcbhead_t; # ifndef __s390x__ @@ -171,6 +172,29 @@ typedef struct #define THREAD_SET_POINTER_GUARD(value) #define THREAD_COPY_POINTER_GUARD(descr) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/sh/tls.h glibc-2.5-branch/nptl/sysdeps/sh/tls.h --- glibc-2.5/nptl/sysdeps/sh/tls.h 2005-12-20 07:24:05.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/sh/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/SH version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -153,6 +153,29 @@ typedef struct __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ ((tcbhead_t *) (descr + 1))->pointer_guard = __tcbp->pointer_guard;}) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/sparc/tls.h glibc-2.5-branch/nptl/sysdeps/sparc/tls.h --- glibc-2.5/nptl/sysdeps/sparc/tls.h 2006-01-02 12:55:23.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/sparc/tls.h 2007-07-12 09:58:05.000000000 -0700 @@ -1,5 +1,5 @@ /* Definitions for thread-local data handling. NPTL/sparc version. - Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -144,6 +144,29 @@ register struct pthread *__thread_self _ # define THREAD_COPY_POINTER_GUARD(descr) \ ((descr)->header.pointer_guard = THREAD_GET_POINTER_GUARD ()) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* !ASSEMBLER */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2004-09-05 18:12:02.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -167,3 +167,9 @@ extern int __local_multiple_threads attr # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/fork.c --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-20 15:37:13.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/fork.c 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -167,8 +167,11 @@ __libc_fork (void) allp->handler->child_handler (); /* Note that we do not have to wake any possible waiter. - This is the only thread in the new process. */ - --allp->handler->refcntr; + This is the only thread in the new process. The count + may have been bumped up by other threads doing a fork. + We reset it to 1, to avoid waiting for non-existing + thread(s) to release the count. */ + allp->handler->refcntr = 1; /* XXX We could at this point look through the object pool and mark all objects not on the __fork_handlers list as diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2006-04-08 19:42:29.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -79,10 +79,7 @@ sem_timedwait: jae 6f cfi_offset(3, -16) /* %ebx */ -7: call __pthread_enable_asynccancel - movl %eax, 8(%esp) - - xorl %ecx, %ecx +7: xorl %ecx, %ecx movl %esp, %ebx movl %ecx, %edx movl $SYS_gettimeofday, %eax @@ -105,6 +102,10 @@ sem_timedwait: movl %ecx, (%esp) /* Store relative timeout. */ movl %edx, 4(%esp) + + call __pthread_enable_asynccancel + movl %eax, 8(%esp) + movl 28(%esp), %ebx xorl %ecx, %ecx movl %esp, %esi diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2005-05-03 15:58:41.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2002. @@ -137,3 +137,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2004-07-05 21:25:45.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2002. @@ -220,3 +220,9 @@ __GC_##name: \ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2006-03-01 16:25:10.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2006. @@ -30,6 +30,10 @@ __lll_robust_lock_wait (int *futex) int oldval = *futex; int tid = THREAD_GETMEM (THREAD_SELF, tid); + /* If the futex changed meanwhile try locking again. */ + if (oldval == 0) + goto try; + do { if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0)) @@ -41,6 +45,9 @@ __lll_robust_lock_wait (int *futex) continue; lll_futex_wait (futex, newval); + + try: + ; } while ((oldval = atomic_compare_and_exchange_val_acq (futex, tid | FUTEX_WAITERS, @@ -57,6 +64,11 @@ __lll_robust_timedlock_wait (int *futex, return EINVAL; int tid = THREAD_GETMEM (THREAD_SELF, tid); + int oldval = *futex; + + /* If the futex changed meanwhile try locking again. */ + if (oldval == 0) + goto try; do { @@ -80,7 +92,6 @@ __lll_robust_timedlock_wait (int *futex, return ETIMEDOUT; /* Wait. */ - int oldval = *futex; if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0)) return oldval; @@ -90,8 +101,13 @@ __lll_robust_timedlock_wait (int *futex, continue; lll_futex_timed_wait (futex, newval, &rt); + + try: + ; } - while (atomic_compare_and_exchange_bool_acq (futex, tid | FUTEX_WAITERS, 0)); + while ((oldval = atomic_compare_and_exchange_val_acq (futex, + tid | FUTEX_WAITERS, + 0)) != 0); return 0; } diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2006-01-04 12:03:07.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2007-07-12 08:33:45.000000000 -0700 @@ -128,3 +128,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2006-01-04 12:03:07.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2007-07-12 08:33:45.000000000 -0700 @@ -117,3 +117,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/pthread_kill.c --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2004-09-28 15:22:37.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2007-01-12 09:58:08.000000000 -0800 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -33,7 +33,15 @@ __pthread_kill (threadid, signo) struct pthread *pd = (struct pthread *) threadid; /* Make sure the descriptor is valid. */ - if (INVALID_TD_P (pd)) + if (DEBUGGING_P && INVALID_TD_P (pd)) + /* Not a valid thread handle. */ + return ESRCH; + + /* Force load of pd->tid into local variable or register. Otherwise + if a thread exits between ESRCH test and tgkill, we might return + EINVAL, because pd->tid would be cleared by the kernel. */ + pid_t tid = atomic_forced_read (pd->tid); + if (__builtin_expect (tid <= 0, 0)) /* Not a valid thread handle. */ return ESRCH; @@ -53,15 +61,15 @@ __pthread_kill (threadid, signo) int val; #if __ASSUME_TGKILL val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid), - pd->tid, signo); + tid, signo); #else # ifdef __NR_tgkill val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid), - pd->tid, signo); + tid, signo); if (INTERNAL_SYSCALL_ERROR_P (val, err) && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS) # endif - val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo); + val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo); #endif return (INTERNAL_SYSCALL_ERROR_P (val, err) diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h 2007-07-12 08:33:44.000000000 -0700 @@ -0,0 +1,153 @@ +/* Defintions for lowlevel handling in ld.so. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _RTLD_LOWLEVEL_H +#define _RTLD_LOWLEVEL_H 1 + +#include +#include + + +/* Special multi-reader lock used in ld.so. */ +#define __RTLD_MRLOCK_WRITER 1 +#define __RTLD_MRLOCK_RWAIT 2 +#define __RTLD_MRLOCK_WWAIT 4 +#define __RTLD_MRLOCK_RBITS \ + ~(__RTLD_MRLOCK_WRITER | __RTLD_MRLOCK_RWAIT | __RTLD_MRLOCK_WWAIT) +#define __RTLD_MRLOCK_INC 8 +#define __RTLD_MRLOCK_TRIES 5 + + +typedef int __rtld_mrlock_t; + + +#define __rtld_mrlock_define(CLASS,NAME) \ + CLASS __rtld_mrlock_t NAME; + + +#define _RTLD_MRLOCK_INITIALIZER 0 +#define __rtld_mrlock_initialize(NAME) \ + (void) ((NAME) = 0) + + +#define __rtld_mrlock_lock(lock) \ + do { \ + __label__ out; \ + while (1) \ + { \ + int oldval; \ + for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries) \ + { \ + oldval = lock; \ + while (__builtin_expect ((oldval \ + & (__RTLD_MRLOCK_WRITER \ + | __RTLD_MRLOCK_WWAIT)) \ + == 0, 1)) \ + { \ + int newval = ((oldval & __RTLD_MRLOCK_RBITS) \ + + __RTLD_MRLOCK_INC); \ + int ret = atomic_compare_and_exchange_val_acq (&(lock), \ + newval, \ + oldval); \ + if (__builtin_expect (ret == oldval, 1)) \ + goto out; \ + oldval = ret; \ + } \ + atomic_delay (); \ + } \ + if ((oldval & __RTLD_MRLOCK_RWAIT) == 0) \ + { \ + atomic_or (&(lock), __RTLD_MRLOCK_RWAIT); \ + oldval |= __RTLD_MRLOCK_RWAIT; \ + } \ + lll_futex_wait (lock, oldval); \ + } \ + out:; \ + } while (0) + + +#define __rtld_mrlock_unlock(lock) \ + do { \ + int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_INC); \ + if (__builtin_expect ((oldval \ + & (__RTLD_MRLOCK_RBITS | __RTLD_MRLOCK_WWAIT)) \ + == (__RTLD_MRLOCK_INC | __RTLD_MRLOCK_WWAIT), 0)) \ + /* We have to wake all threads since there might be some queued \ + readers already. */ \ + lll_futex_wake (&(lock), 0x7fffffff); \ + } while (0) + + +/* There can only ever be one thread trying to get the exclusive lock. */ +#define __rtld_mrlock_change(lock) \ + do { \ + __label__ out; \ + while (1) \ + { \ + int oldval; \ + for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries) \ + { \ + oldval = lock; \ + while (__builtin_expect ((oldval & __RTLD_MRLOCK_RBITS) == 0, 1)) \ + { \ + int newval = ((oldval & __RTLD_MRLOCK_RWAIT) \ + + __RTLD_MRLOCK_WRITER); \ + int ret = atomic_compare_and_exchange_val_acq (&(lock), \ + newval, \ + oldval); \ + if (__builtin_expect (ret == oldval, 1)) \ + goto out; \ + oldval = ret; \ + } \ + atomic_delay (); \ + } \ + atomic_or (&(lock), __RTLD_MRLOCK_WWAIT); \ + oldval |= __RTLD_MRLOCK_WWAIT; \ + lll_futex_wait (lock, oldval); \ + } \ + out:; \ + } while (0) + + +#define __rtld_mrlock_done(lock) \ + do { \ + int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_WRITER); \ + if (__builtin_expect ((oldval & __RTLD_MRLOCK_RWAIT) != 0, 0)) \ + lll_futex_wake (&(lock), 0x7fffffff); \ + } while (0) + + +/* Function to wait for variable become zero. Used in ld.so for + reference counters. */ +#define __rtld_waitzero(word) \ + do { \ + while (1) \ + { \ + int val = word; \ + if (val == 0) \ + break; \ + lll_futex_wait (&(word), val); \ + } \ + } while (0) + + +#define __rtld_notify(word) \ + lll_futex_wake (&(word), 1) + +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h 2004-07-05 21:25:44.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -113,3 +113,9 @@ L(pseudo_end): # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h 2004-07-05 21:25:44.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -126,3 +126,9 @@ extern int __local_multiple_threads attr # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2005-12-30 14:18:03.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -161,3 +161,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2006-03-05 17:34:01.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2007-07-12 09:58:06.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2002. @@ -104,3 +104,9 @@ __##syscall_name##_nocancel: \ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2006-03-05 17:34:01.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2007-07-12 08:33:45.000000000 -0700 @@ -102,3 +102,9 @@ __##syscall_name##_nocancel: \ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2006-09-05 07:46:43.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -164,7 +164,7 @@ __lll_mutex_timedlock_wait: 8: /* NB: %edx == 2 */ xorl %eax, %eax LOCK - cmpxchgl %edx, (%rdi) + cmpxchgl %edx, (%r12) jnz 7f 6: addq $16, %rsp diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2005-03-31 02:00:15.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -79,10 +79,7 @@ sem_timedwait: cfi_offset(14, -24) /* %r14 */ jae 6f -7: call __pthread_enable_asynccancel - movl %eax, 16(%rsp) - - xorl %esi, %esi +7: xorl %esi, %esi movq %rsp, %rdi movq $VSYSCALL_ADDR_vgettimeofday, %rax callq *%rax @@ -105,6 +102,9 @@ sem_timedwait: movq %rdi, (%rsp) /* Store relative timeout. */ movq %rsi, 8(%rsp) + call __pthread_enable_asynccancel + movl %eax, 16(%rsp) + movq %rsp, %r10 movq %r12, %rdi xorl %esi, %esi diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h --- glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2005-03-31 02:00:15.000000000 -0800 +++ glibc-2.5-branch/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2002. @@ -136,3 +136,9 @@ extern int __local_multiple_threads attr # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff -pNur -x CVS -x libidn glibc-2.5/nptl/sysdeps/x86_64/tls.h glibc-2.5-branch/nptl/sysdeps/x86_64/tls.h --- glibc-2.5/nptl/sysdeps/x86_64/tls.h 2006-04-26 18:25:34.000000000 -0700 +++ glibc-2.5-branch/nptl/sysdeps/x86_64/tls.h 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/x86_64 version. - Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,6 +47,7 @@ typedef struct dtv_t *dtv; void *self; /* Pointer to the thread descriptor. */ int multiple_threads; + int gscope_flag; uintptr_t sysinfo; uintptr_t stack_guard; uintptr_t pointer_guard; @@ -339,6 +340,26 @@ typedef struct = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) +/* Get and set the global scope generation counter in the TCB head. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res; \ + asm volatile ("xchgl %0, %%fs:%P1" \ + : "=r" (__res) \ + : "i" (offsetof (struct pthread, header.gscope_flag)), \ + "0" (THREAD_GSCOPE_FLAG_UNUSED)); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff -pNur -x CVS -x libidn glibc-2.5/nptl/tst-cancel4.c glibc-2.5-branch/nptl/tst-cancel4.c --- glibc-2.5/nptl/tst-cancel4.c 2006-01-19 22:59:03.000000000 -0800 +++ glibc-2.5-branch/nptl/tst-cancel4.c 2007-07-12 09:58:05.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -1571,6 +1571,47 @@ tf_fsync (void *arg) static void * +tf_fdatasync (void *arg) +{ + if (arg == NULL) + // XXX If somebody can provide a portable test case in which fdatasync() + // blocks we can enable this test to run in both rounds. + abort (); + + tempfd = open ("Makefile", O_RDONLY); + if (tempfd == -1) + { + printf ("%s: cannot open Makefile\n", __FUNCTION__); + exit (1); + } + + int r = pthread_barrier_wait (&b2); + if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __FUNCTION__); + exit (1); + } + + r = pthread_barrier_wait (&b2); + if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); + exit (1); + } + + pthread_cleanup_push (cl, NULL); + + fdatasync (tempfd); + + pthread_cleanup_pop (0); + + printf ("%s: fdatasync returned\n", __FUNCTION__); + + exit (1); +} + + +static void * tf_msync (void *arg) { if (arg == NULL) @@ -2078,6 +2119,7 @@ static struct ADD_TEST (pread, 2, 1), ADD_TEST (pwrite, 2, 1), ADD_TEST (fsync, 2, 1), + ADD_TEST (fdatasync, 2, 1), ADD_TEST (msync, 2, 1), ADD_TEST (sendto, 2, 1), ADD_TEST (sendmsg, 2, 1), diff -pNur -x CVS -x libidn glibc-2.5/nptl/tst-cancel-wrappers.sh glibc-2.5-branch/nptl/tst-cancel-wrappers.sh --- glibc-2.5/nptl/tst-cancel-wrappers.sh 2003-07-20 01:35:45.000000000 -0700 +++ glibc-2.5-branch/nptl/tst-cancel-wrappers.sh 2007-07-12 09:58:05.000000000 -0700 @@ -1,6 +1,6 @@ #! /bin/sh # Test whether all cancelable functions are cancelable. -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Jakub Jelinek , 2002. @@ -26,6 +26,7 @@ C["close"]=1 C["connect"]=1 C["creat"]=1 C["fcntl"]=1 +C["fdatasync"]=1 C["fsync"]=1 C["msgrcv"]=1 C["msgsnd"]=1 diff -pNur -x CVS -x libidn glibc-2.5/nptl/tst-robust9.c glibc-2.5-branch/nptl/tst-robust9.c --- glibc-2.5/nptl/tst-robust9.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/nptl/tst-robust9.c 2007-07-12 08:23:22.000000000 -0700 @@ -0,0 +1,94 @@ +#include +#include +#include +#include +#include +#include + + +static pthread_mutex_t m; + +static void * +tf (void *data) +{ + int err = pthread_mutex_lock (&m); + if (err == EOWNERDEAD) + { + err = pthread_mutex_consistent_np (&m); + if (err) + { + puts ("pthread_mutex_consistent_np"); + exit (1); + } + } + else if (err) + { + puts ("pthread_mutex_lock"); + exit (1); + } + printf ("thread%ld got the lock.\n", (long int) data); + sleep (1); + /* exit without unlock */ + return NULL; +} + +static int +do_test (void) +{ + int err, i; + pthread_t t[3]; + pthread_mutexattr_t ma; + + pthread_mutexattr_init (&ma); + err = pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP); + if (err) + { + puts ("pthread_mutexattr_setrobust_np"); + return 1; + } +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + err = pthread_mutex_init (&m, &ma); +#ifdef ENABLE_PI + if (err == ENOTSUP) + { + puts ("PI robust mutexes not supported"); + return 0; + } +#endif + if (err) + { + puts ("pthread_mutex_init"); + return 1; + } + + for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) + { + err = pthread_create (&t[i], NULL, tf, (void *) (long int) i); + if (err) + { + puts ("pthread_create"); + return 1; + } + } + + for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) + { + err = pthread_join (t[i], NULL); + if (err) + { + puts ("pthread_join"); + return 1; + } + } + return 0; +} + +#define TIMEOUT 5 +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/nptl/tst-robustpi9.c glibc-2.5-branch/nptl/tst-robustpi9.c --- glibc-2.5/nptl/tst-robustpi9.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/nptl/tst-robustpi9.c 2007-07-12 08:23:22.000000000 -0700 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust9.c" diff -pNur -x CVS -x libidn glibc-2.5/nptl/tst-sem10.c glibc-2.5-branch/nptl/tst-sem10.c --- glibc-2.5/nptl/tst-sem10.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.5-branch/nptl/tst-sem10.c 2007-07-12 08:27:35.000000000 -0700 @@ -0,0 +1,88 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2007. + + 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 +#include +#include +#include +#include +#include +#include + + +static int +do_test (void) +{ + sem_t s; + if (sem_init (&s, 0, 0) == -1) + { + puts ("sem_init failed"); + return 1; + } + + struct timeval tv; + if (gettimeofday (&tv, NULL) != 0) + { + puts ("gettimeofday failed"); + return 1; + } + + struct timespec ts; + TIMEVAL_TO_TIMESPEC (&tv, &ts); + + /* Set ts to yesterday. */ + ts.tv_sec -= 86400; + + int type_before; + if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_before) != 0) + { + puts ("first pthread_setcanceltype failed"); + return 1; + } + + errno = 0; + if (TEMP_FAILURE_RETRY (sem_timedwait (&s, &ts)) != -1) + { + puts ("sem_timedwait succeeded"); + return 1; + } + if (errno != ETIMEDOUT) + { + printf ("sem_timedwait return errno = %d instead of ETIMEDOUT\n", + errno); + return 1; + } + + int type_after; + if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_after) != 0) + { + puts ("second pthread_setcanceltype failed"); + return 1; + } + if (type_after != PTHREAD_CANCEL_DEFERRED) + { + puts ("sem_timedwait changed cancellation type"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -pNur -x CVS -x libidn glibc-2.5/nptl_db/ChangeLog glibc-2.5-branch/nptl_db/ChangeLog --- glibc-2.5/nptl_db/ChangeLog 2006-02-03 16:48:40.000000000 -0800 +++ glibc-2.5-branch/nptl_db/ChangeLog 2007-01-12 07:18:15.000000000 -0800 @@ -1,3 +1,8 @@ +2006-10-26 Pete Eberlein + + * nptl_db/db_info.c [TLS_DTV_AT_TP]: Fixed size init for dtvp + to sizeof a pointer, instead of sizeof the union. + 2006-02-03 Roland McGrath * structs.def: Add a descriptor for pointer.val field of dtv_t. diff -pNur -x CVS -x libidn glibc-2.5/nptl_db/db_info.c glibc-2.5-branch/nptl_db/db_info.c --- glibc-2.5/nptl_db/db_info.c 2004-03-13 19:39:57.000000000 -0800 +++ glibc-2.5-branch/nptl_db/db_info.c 2007-01-12 07:18:15.000000000 -0800 @@ -59,7 +59,7 @@ typedef struct link_map link_map; i.e. at the very end of the area covered by TLS_PRE_TCB_SIZE. */ DESC (_thread_db_pthread_dtvp, TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv) - - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv) + - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv *) #endif diff -pNur -x CVS -x libidn glibc-2.5/nscd/gai.c glibc-2.5-branch/nscd/gai.c --- glibc-2.5/nscd/gai.c 2006-05-04 09:00:56.000000000 -0700 +++ glibc-2.5-branch/nscd/gai.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include /* This file uses the getaddrinfo code but it compiles it without NSCD support. We just need a few symbol renames. */ #define __getservbyname_r getservbyname_r @@ -26,6 +27,8 @@ #define __sendto sendto #define __strchrnul strchrnul #define __getline getline +/* nscd uses 1MB or 2MB thread stacks. */ +#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF) #include diff -pNur -x CVS -x libidn glibc-2.5/nscd/grpcache.c glibc-2.5-branch/nscd/grpcache.c --- glibc-2.5/nscd/grpcache.c 2006-04-26 10:25:07.000000000 -0700 +++ glibc-2.5-branch/nscd/grpcache.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,5 @@ /* Cache handling for group lookup. - Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -279,6 +279,7 @@ cache_addgr (struct database_dyn *db, in /* Adjust pointers into the memory block. */ gr_name = (char *) newp + (gr_name - (char *) dataset); cp = (char *) newp + (cp - (char *) dataset); + key_copy = (char *) newp + (key_copy - (char *) dataset); dataset = memcpy (newp, dataset, total + n); alloca_used = false; diff -pNur -x CVS -x libidn glibc-2.5/nscd/mem.c glibc-2.5-branch/nscd/mem.c --- glibc-2.5/nscd/mem.c 2005-12-06 21:47:27.000000000 -0800 +++ glibc-2.5-branch/nscd/mem.c 2006-10-02 09:31:11.000000000 -0700 @@ -1,5 +1,5 @@ /* Cache memory handling. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -480,12 +480,12 @@ mempool_alloc (struct database_dyn *db, { /* Try to resize the database. Grow size of 1/8th. */ size_t oldtotal = (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) + + roundup (db->head->module * sizeof (ref_t), ALIGN) + db->head->data_size); size_t new_data_size = (db->head->data_size + MAX (2 * len, db->head->data_size / 8)); size_t newtotal = (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) + + roundup (db->head->module * sizeof (ref_t), ALIGN) + new_data_size); if (newtotal > db->max_db_size) { diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd.c glibc-2.5-branch/nscd/nscd.c --- glibc-2.5/nscd/nscd.c 2006-05-30 10:29:36.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd.c 2006-10-06 08:24:36.000000000 -0700 @@ -237,7 +237,7 @@ main (int argc, char **argv) if (chdir ("/") != 0) error (EXIT_FAILURE, errno, - _("cannot change current working cirectory to \"/\"")); + _("cannot change current working directory to \"/\"")); openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd-client.h glibc-2.5-branch/nscd/nscd-client.h --- glibc-2.5/nscd/nscd-client.h 2006-04-25 16:48:55.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd-client.h 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006 +/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -258,6 +258,7 @@ struct mapped_database const char *data; size_t mapsize; int counter; /* > 0 indicates it is usable. */ + size_t datasize; }; #define NO_MAPPING ((struct mapped_database *) -1l) @@ -306,10 +307,10 @@ static inline int __nscd_drop_map_ref (s /* Search the mapped database. */ -extern const struct datahead *__nscd_cache_search (request_type type, - const char *key, - size_t keylen, - const struct mapped_database *mapped); +extern struct datahead *__nscd_cache_search (request_type type, + const char *key, + size_t keylen, + const struct mapped_database *mapped); /* Wrappers around read, readv and write that only read/write less than LEN bytes on error or EOF. */ diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_getai.c glibc-2.5-branch/nscd/nscd_getai.c --- glibc-2.5/nscd/nscd_getai.c 2006-05-15 13:31:29.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_getai.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -42,6 +42,7 @@ __nscd_getai (const char *key, struct ns { size_t keylen = strlen (key) + 1; int gc_cycle; + int nretries = 0; /* If the mapping is available, try to search there instead of communicating with the nscd. */ @@ -50,49 +51,53 @@ __nscd_getai (const char *key, struct ns &gc_cycle); retry:; - const ai_response_header *ai_resp = NULL; struct nscd_ai_result *resultbuf = NULL; const char *recend = (const char *) ~UINTMAX_C (0); char *respdata = NULL; int retval = -1; int sock = -1; + ai_response_header ai_resp; if (mapped != NO_MAPPING) { - const struct datahead *found = __nscd_cache_search (GETAI, key, keylen, - mapped); + struct datahead *found = __nscd_cache_search (GETAI, key, keylen, + mapped); if (found != NULL) { - ai_resp = &found->data[0].aidata; - respdata = (char *) (ai_resp + 1); + respdata = (char *) (&found->data[0].aidata + 1); + ai_resp = found->data[0].aidata; recend = (const char *) found->data + found->recsize; + /* Now check if we can trust ai_resp fields. If GC is + in progress, it can contain anything. */ + if (mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out; + } } } /* If we do not have the cache mapped, try to get the data over the socket. */ - ai_response_header ai_resp_mem; - if (ai_resp == NULL) + if (respdata == NULL) { - sock = __nscd_open_socket (key, keylen, GETAI, &ai_resp_mem, - sizeof (ai_resp_mem)); + sock = __nscd_open_socket (key, keylen, GETAI, &ai_resp, + sizeof (ai_resp)); if (sock == -1) { /* nscd not running or wrong version. */ __nss_not_use_nscd_hosts = 1; goto out; } - - ai_resp = &ai_resp_mem; } - if (ai_resp->found == 1) + if (ai_resp.found == 1) { - size_t datalen = ai_resp->naddrs + ai_resp->addrslen + ai_resp->canonlen; + size_t datalen = ai_resp.naddrs + ai_resp.addrslen + ai_resp.canonlen; - /* This check is really only affects the case where the data + /* This check really only affects the case where the data comes from the mapped cache. */ - if ((char *) (ai_resp + 1) + datalen > recend) + if (respdata + datalen > recend) { assert (sock == -1); goto out; @@ -108,10 +113,10 @@ __nscd_getai (const char *key, struct ns } /* Set up the data structure, including pointers. */ - resultbuf->naddrs = ai_resp->naddrs; + resultbuf->naddrs = ai_resp.naddrs; resultbuf->addrs = (char *) (resultbuf + 1); - resultbuf->family = (uint8_t *) (resultbuf->addrs + ai_resp->addrslen); - if (ai_resp->canonlen != 0) + resultbuf->family = (uint8_t *) (resultbuf->addrs + ai_resp.addrslen); + if (ai_resp.canonlen != 0) resultbuf->canon = (char *) (resultbuf->family + resultbuf->naddrs); else resultbuf->canon = NULL; @@ -137,10 +142,13 @@ __nscd_getai (const char *key, struct ns /* Try to detect corrupt databases. */ if (resultbuf->canon != NULL - && resultbuf->canon[ai_resp->canonlen - 1] != '\0') + && resultbuf->canon[ai_resp.canonlen - 1] != '\0') /* We cannot use the database. */ { - free (resultbuf); + if (mapped->head->gc_cycle != gc_cycle) + retval = -2; + else + free (resultbuf); goto out_close; } @@ -150,7 +158,7 @@ __nscd_getai (const char *key, struct ns } else { - if (__builtin_expect (ai_resp->found == -1, 0)) + if (__builtin_expect (ai_resp.found == -1, 0)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_hosts = 1; @@ -158,7 +166,7 @@ __nscd_getai (const char *key, struct ns } /* Store the error number. */ - *h_errnop = ai_resp->error; + *h_errnop = ai_resp.error; /* The `errno' to some value != ERANGE. */ __set_errno (ENOENT); @@ -170,22 +178,25 @@ __nscd_getai (const char *key, struct ns if (sock != -1) close_not_cancel_no_status (sock); out: - if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0 && retval != -1) + if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0) { /* When we come here this means there has been a GC cycle while we were looking for the data. This means the data might have been inconsistent. Retry if possible. */ - if ((gc_cycle & 1) != 0) + if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - __nscd_unmap (mapped); + if (atomic_decrement_val (&mapped->counter) == 0) + __nscd_unmap (mapped); mapped = NO_MAPPING; } - *result = NULL; - free (resultbuf); - - goto retry; + if (retval != -1) + { + *result = NULL; + free (resultbuf); + goto retry; + } } return retval; diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_getgr_r.c glibc-2.5-branch/nscd/nscd_getgr_r.c --- glibc-2.5/nscd/nscd_getgr_r.c 2006-05-15 13:39:34.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_getgr_r.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1998-2000, 2002-2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -88,6 +89,7 @@ nscd_getgr_r (const char *key, size_t ke struct group **result) { int gc_cycle; + int nretries = 0; const uint32_t *len = NULL; size_t lensize = 0; @@ -97,55 +99,59 @@ nscd_getgr_r (const char *key, size_t ke &__gr_map_handle, &gc_cycle); retry:; - const gr_response_header *gr_resp = NULL; const char *gr_name = NULL; size_t gr_name_len = 0; int retval = -1; const char *recend = (const char *) ~UINTMAX_C (0); + gr_response_header gr_resp; if (mapped != NO_MAPPING) { - const struct datahead *found = __nscd_cache_search (type, key, keylen, - mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); if (found != NULL) { - gr_resp = &found->data[0].grdata; - len = (const uint32_t *) (gr_resp + 1); - /* The alignment is always sufficient. */ - assert (((uintptr_t) len & (__alignof__ (*len) - 1)) == 0); + len = (const uint32_t *) (&found->data[0].grdata + 1); + gr_resp = found->data[0].grdata; gr_name = ((const char *) len - + gr_resp->gr_mem_cnt * sizeof (uint32_t)); - gr_name_len = gr_resp->gr_name_len + gr_resp->gr_passwd_len; + + gr_resp.gr_mem_cnt * sizeof (uint32_t)); + gr_name_len = gr_resp.gr_name_len + gr_resp.gr_passwd_len; recend = (const char *) found->data + found->recsize; + /* Now check if we can trust gr_resp fields. If GC is + in progress, it can contain anything. */ + if (mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out; + } + + /* The alignment is always sufficient, unless GC is in progress. */ + assert (((uintptr_t) len & (__alignof__ (*len) - 1)) == 0); } } - gr_response_header gr_resp_mem; int sock = -1; - if (gr_resp == NULL) + if (gr_name == NULL) { - sock = __nscd_open_socket (key, keylen, type, &gr_resp_mem, - sizeof (gr_resp_mem)); + sock = __nscd_open_socket (key, keylen, type, &gr_resp, + sizeof (gr_resp)); if (sock == -1) { __nss_not_use_nscd_group = 1; goto out; } - - gr_resp = &gr_resp_mem; } /* No value found so far. */ *result = NULL; - if (__builtin_expect (gr_resp->found == -1, 0)) + if (__builtin_expect (gr_resp.found == -1, 0)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_group = 1; goto out_close; } - if (gr_resp->found == 1) + if (gr_resp.found == 1) { struct iovec vec[2]; char *p = buffer; @@ -157,8 +163,8 @@ nscd_getgr_r (const char *key, size_t ke align the pointer. */ align = ((__alignof__ (char *) - (p - ((char *) 0))) & (__alignof__ (char *) - 1)); - total_len = (align + (1 + gr_resp->gr_mem_cnt) * sizeof (char *) - + gr_resp->gr_name_len + gr_resp->gr_passwd_len); + total_len = (align + (1 + gr_resp.gr_mem_cnt) * sizeof (char *) + + gr_resp.gr_name_len + gr_resp.gr_passwd_len); if (__builtin_expect (buflen < total_len, 0)) { no_room: @@ -170,16 +176,16 @@ nscd_getgr_r (const char *key, size_t ke p += align; resultbuf->gr_mem = (char **) p; - p += (1 + gr_resp->gr_mem_cnt) * sizeof (char *); + p += (1 + gr_resp.gr_mem_cnt) * sizeof (char *); /* Set pointers for strings. */ resultbuf->gr_name = p; - p += gr_resp->gr_name_len; + p += gr_resp.gr_name_len; resultbuf->gr_passwd = p; - p += gr_resp->gr_passwd_len; + p += gr_resp.gr_passwd_len; /* Fill in what we know now. */ - resultbuf->gr_gid = gr_resp->gr_gid; + resultbuf->gr_gid = gr_resp.gr_gid; /* Read the length information, group name, and password. */ if (gr_name == NULL) @@ -187,17 +193,17 @@ nscd_getgr_r (const char *key, size_t ke /* Allocate array to store lengths. */ if (lensize == 0) { - lensize = gr_resp->gr_mem_cnt * sizeof (uint32_t); + lensize = gr_resp.gr_mem_cnt * sizeof (uint32_t); len = (uint32_t *) alloca (lensize); } - else if (gr_resp->gr_mem_cnt * sizeof (uint32_t) > lensize) + else if (gr_resp.gr_mem_cnt * sizeof (uint32_t) > lensize) len = extend_alloca (len, lensize, - gr_resp->gr_mem_cnt * sizeof (uint32_t)); + gr_resp.gr_mem_cnt * sizeof (uint32_t)); vec[0].iov_base = (void *) len; - vec[0].iov_len = gr_resp->gr_mem_cnt * sizeof (uint32_t); + vec[0].iov_len = gr_resp.gr_mem_cnt * sizeof (uint32_t); vec[1].iov_base = resultbuf->gr_name; - vec[1].iov_len = gr_resp->gr_name_len + gr_resp->gr_passwd_len; + vec[1].iov_len = gr_resp.gr_name_len + gr_resp.gr_passwd_len; total_len = vec[0].iov_len + vec[1].iov_len; /* Get this data. */ @@ -209,14 +215,14 @@ nscd_getgr_r (const char *key, size_t ke /* We already have the data. Just copy the group name and password. */ memcpy (resultbuf->gr_name, gr_name, - gr_resp->gr_name_len + gr_resp->gr_passwd_len); + gr_resp.gr_name_len + gr_resp.gr_passwd_len); /* Clear the terminating entry. */ - resultbuf->gr_mem[gr_resp->gr_mem_cnt] = NULL; + resultbuf->gr_mem[gr_resp.gr_mem_cnt] = NULL; /* Prepare reading the group members. */ total_len = 0; - for (cnt = 0; cnt < gr_resp->gr_mem_cnt; ++cnt) + for (cnt = 0; cnt < gr_resp.gr_mem_cnt; ++cnt) { resultbuf->gr_mem[cnt] = p; total_len += len[cnt]; @@ -224,9 +230,25 @@ nscd_getgr_r (const char *key, size_t ke } if (__builtin_expect (gr_name + gr_name_len + total_len > recend, 0)) - goto out_close; + { + /* len array might contain garbage during nscd GC cycle, + retry rather than fail in that case. */ + if (gr_name != NULL && mapped->head->gc_cycle != gc_cycle) + retval = -2; + goto out_close; + } if (__builtin_expect (total_len > buflen, 0)) - goto no_room; + { + /* len array might contain garbage during nscd GC cycle, + retry rather than fail in that case. */ + if (gr_name != NULL && mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out_close; + } + else + goto no_room; + } retval = 0; if (gr_name == NULL) @@ -248,14 +270,14 @@ nscd_getgr_r (const char *key, size_t ke /* Try to detect corrupt databases. */ if (resultbuf->gr_name[gr_name_len - 1] != '\0' - || resultbuf->gr_passwd[gr_resp->gr_passwd_len - 1] != '\0' - || ({for (cnt = 0; cnt < gr_resp->gr_mem_cnt; ++cnt) + || resultbuf->gr_passwd[gr_resp.gr_passwd_len - 1] != '\0' + || ({for (cnt = 0; cnt < gr_resp.gr_mem_cnt; ++cnt) if (resultbuf->gr_mem[cnt][len[cnt] - 1] != '\0') break; - cnt < gr_resp->gr_mem_cnt; })) + cnt < gr_resp.gr_mem_cnt; })) { /* We cannot use the database. */ - retval = -1; + retval = mapped->head->gc_cycle != gc_cycle ? -2 : -1; goto out_close; } @@ -274,19 +296,21 @@ nscd_getgr_r (const char *key, size_t ke if (sock != -1) close_not_cancel_no_status (sock); out: - if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0 && retval != -1) + if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0) { /* When we come here this means there has been a GC cycle while we were looking for the data. This means the data might have been inconsistent. Retry if possible. */ - if ((gc_cycle & 1) != 0) + if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - __nscd_unmap (mapped); + if (atomic_decrement_val (&mapped->counter) == 0) + __nscd_unmap (mapped); mapped = NO_MAPPING; } - goto retry; + if (retval != -1) + goto retry; } return retval; diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_gethst_r.c glibc-2.5-branch/nscd/nscd_gethst_r.c --- glibc-2.5/nscd/nscd_gethst_r.c 2006-05-15 13:30:27.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_gethst_r.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -118,7 +118,6 @@ nscd_gethst_r (const char *key, size_t k &gc_cycle); retry:; - const hst_response_header *hst_resp = NULL; const char *h_name = NULL; const uint32_t *aliases_len = NULL; const char *addr_list = NULL; @@ -126,18 +125,27 @@ nscd_gethst_r (const char *key, size_t k int retval = -1; const char *recend = (const char *) ~UINTMAX_C (0); int sock = -1; + hst_response_header hst_resp; if (mapped != NO_MAPPING) { - const struct datahead *found = __nscd_cache_search (type, key, keylen, - mapped); + /* No const qualifier, as it can change during garbage collection. */ + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); if (found != NULL) { - hst_resp = &found->data[0].hstdata; - h_name = (char *) (hst_resp + 1); - aliases_len = (uint32_t *) (h_name + hst_resp->h_name_len); + h_name = (char *) (&found->data[0].hstdata + 1); + hst_resp = found->data[0].hstdata; + aliases_len = (uint32_t *) (h_name + hst_resp.h_name_len); addr_list = ((char *) aliases_len - + hst_resp->h_aliases_cnt * sizeof (uint32_t)); - addr_list_len = hst_resp->h_addr_list_cnt * INADDRSZ; + + hst_resp.h_aliases_cnt * sizeof (uint32_t)); + addr_list_len = hst_resp.h_addr_list_cnt * INADDRSZ; + recend = (const char *) found->data + found->recsize; + /* Now check if we can trust hst_resp fields. If GC is + in progress, it can contain anything. */ + if (mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out; + } #ifndef _STRING_ARCH_unaligned /* The aliases_len array in the mapped database might very @@ -147,51 +155,47 @@ nscd_gethst_r (const char *key, size_t k if (((uintptr_t) aliases_len & (__alignof__ (*aliases_len) - 1)) != 0) { - uint32_t *tmp = alloca (hst_resp->h_aliases_cnt + uint32_t *tmp = alloca (hst_resp.h_aliases_cnt * sizeof (uint32_t)); aliases_len = memcpy (tmp, aliases_len, - hst_resp->h_aliases_cnt + hst_resp.h_aliases_cnt * sizeof (uint32_t)); } #endif if (type != GETHOSTBYADDR && type != GETHOSTBYNAME) { - if (hst_resp->h_length == INADDRSZ) + if (hst_resp.h_length == INADDRSZ) addr_list += addr_list_len; - addr_list_len = hst_resp->h_addr_list_cnt * IN6ADDRSZ; + addr_list_len = hst_resp.h_addr_list_cnt * IN6ADDRSZ; } - recend = (const char *) found->data + found->recsize; if (__builtin_expect ((const char *) addr_list + addr_list_len > recend, 0)) - goto out_close; + goto out; } } - hst_response_header hst_resp_mem; - if (hst_resp == NULL) + if (h_name == NULL) { - sock = __nscd_open_socket (key, keylen, type, &hst_resp_mem, - sizeof (hst_resp_mem)); + sock = __nscd_open_socket (key, keylen, type, &hst_resp, + sizeof (hst_resp)); if (sock == -1) { __nss_not_use_nscd_hosts = 1; - goto out;; + goto out; } - - hst_resp = &hst_resp_mem; } /* No value found so far. */ *result = NULL; - if (__builtin_expect (hst_resp->found == -1, 0)) + if (__builtin_expect (hst_resp.found == -1, 0)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_hosts = 1; goto out_close; } - if (hst_resp->found == 1) + if (hst_resp.found == 1) { struct iovec vec[4]; char *cp = buffer; @@ -207,15 +211,15 @@ nscd_gethst_r (const char *key, size_t k align the pointer and the base of the h_addr_list pointers. */ align1 = ((__alignof__ (char *) - (cp - ((char *) 0))) & (__alignof__ (char *) - 1)); - align2 = ((__alignof__ (char *) - ((cp + align1 + hst_resp->h_name_len) + align2 = ((__alignof__ (char *) - ((cp + align1 + hst_resp.h_name_len) - ((char *) 0))) & (__alignof__ (char *) - 1)); - if (buflen < (align1 + hst_resp->h_name_len + align2 - + ((hst_resp->h_aliases_cnt + hst_resp->h_addr_list_cnt + if (buflen < (align1 + hst_resp.h_name_len + align2 + + ((hst_resp.h_aliases_cnt + hst_resp.h_addr_list_cnt + 2) * sizeof (char *)) - + hst_resp->h_addr_list_cnt * (type == AF_INET - ? INADDRSZ : IN6ADDRSZ))) + + hst_resp.h_addr_list_cnt * (type == AF_INET + ? INADDRSZ : IN6ADDRSZ))) { no_room: *h_errnop = NETDB_INTERNAL; @@ -227,12 +231,12 @@ nscd_gethst_r (const char *key, size_t k /* Prepare the result as far as we can. */ resultbuf->h_aliases = (char **) cp; - cp += (hst_resp->h_aliases_cnt + 1) * sizeof (char *); + cp += (hst_resp.h_aliases_cnt + 1) * sizeof (char *); resultbuf->h_addr_list = (char **) cp; - cp += (hst_resp->h_addr_list_cnt + 1) * sizeof (char *); + cp += (hst_resp.h_addr_list_cnt + 1) * sizeof (char *); resultbuf->h_name = cp; - cp += hst_resp->h_name_len + align2; + cp += hst_resp.h_name_len + align2; if (type == GETHOSTBYADDR || type == GETHOSTBYNAME) { @@ -244,7 +248,7 @@ nscd_gethst_r (const char *key, size_t k resultbuf->h_addrtype = AF_INET6; resultbuf->h_length = IN6ADDRSZ; } - for (cnt = 0; cnt < hst_resp->h_addr_list_cnt; ++cnt) + for (cnt = 0; cnt < hst_resp.h_addr_list_cnt; ++cnt) { resultbuf->h_addr_list[cnt] = cp; cp += resultbuf->h_length; @@ -254,47 +258,47 @@ nscd_gethst_r (const char *key, size_t k if (h_name == NULL) { vec[0].iov_base = resultbuf->h_name; - vec[0].iov_len = hst_resp->h_name_len; - total_len = hst_resp->h_name_len; + vec[0].iov_len = hst_resp.h_name_len; + total_len = hst_resp.h_name_len; n = 1; - if (hst_resp->h_aliases_cnt > 0) + if (hst_resp.h_aliases_cnt > 0) { - aliases_len = alloca (hst_resp->h_aliases_cnt + aliases_len = alloca (hst_resp.h_aliases_cnt * sizeof (uint32_t)); vec[n].iov_base = (void *) aliases_len; - vec[n].iov_len = hst_resp->h_aliases_cnt * sizeof (uint32_t); + vec[n].iov_len = hst_resp.h_aliases_cnt * sizeof (uint32_t); - total_len += hst_resp->h_aliases_cnt * sizeof (uint32_t); + total_len += hst_resp.h_aliases_cnt * sizeof (uint32_t); ++n; } if (type == GETHOSTBYADDR || type == GETHOSTBYNAME) { vec[n].iov_base = resultbuf->h_addr_list[0]; - vec[n].iov_len = hst_resp->h_addr_list_cnt * INADDRSZ; + vec[n].iov_len = hst_resp.h_addr_list_cnt * INADDRSZ; - total_len += hst_resp->h_addr_list_cnt * INADDRSZ; + total_len += hst_resp.h_addr_list_cnt * INADDRSZ; ++n; } else { - if (hst_resp->h_length == INADDRSZ) + if (hst_resp.h_length == INADDRSZ) { - ignore = alloca (hst_resp->h_addr_list_cnt * INADDRSZ); + ignore = alloca (hst_resp.h_addr_list_cnt * INADDRSZ); vec[n].iov_base = ignore; - vec[n].iov_len = hst_resp->h_addr_list_cnt * INADDRSZ; + vec[n].iov_len = hst_resp.h_addr_list_cnt * INADDRSZ; - total_len += hst_resp->h_addr_list_cnt * INADDRSZ; + total_len += hst_resp.h_addr_list_cnt * INADDRSZ; ++n; } vec[n].iov_base = resultbuf->h_addr_list[0]; - vec[n].iov_len = hst_resp->h_addr_list_cnt * IN6ADDRSZ; + vec[n].iov_len = hst_resp.h_addr_list_cnt * IN6ADDRSZ; - total_len += hst_resp->h_addr_list_cnt * IN6ADDRSZ; + total_len += hst_resp.h_addr_list_cnt * IN6ADDRSZ; ++n; } @@ -304,13 +308,13 @@ nscd_gethst_r (const char *key, size_t k } else { - memcpy (resultbuf->h_name, h_name, hst_resp->h_name_len); + memcpy (resultbuf->h_name, h_name, hst_resp.h_name_len); memcpy (resultbuf->h_addr_list[0], addr_list, addr_list_len); } /* Now we also can read the aliases. */ total_len = 0; - for (cnt = 0; cnt < hst_resp->h_aliases_cnt; ++cnt) + for (cnt = 0; cnt < hst_resp.h_aliases_cnt; ++cnt) { resultbuf->h_aliases[cnt] = cp; cp += aliases_len[cnt]; @@ -320,10 +324,25 @@ nscd_gethst_r (const char *key, size_t k if (__builtin_expect ((const char *) addr_list + addr_list_len + total_len > recend, 0)) - goto out_close; + { + /* aliases_len array might contain garbage during nscd GC cycle, + retry rather than fail in that case. */ + if (addr_list != NULL && mapped->head->gc_cycle != gc_cycle) + retval = -2; + goto out_close; + } /* See whether this would exceed the buffer capacity. */ if (__builtin_expect (cp > buffer + buflen, 0)) - goto no_room; + { + /* aliases_len array might contain garbage during nscd GC cycle, + retry rather than fail in that case. */ + if (addr_list != NULL && mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out_close; + } + goto no_room; + } /* And finally read the aliases. */ if (addr_list == NULL) @@ -342,14 +361,18 @@ nscd_gethst_r (const char *key, size_t k (const char *) addr_list + addr_list_len, total_len); /* Try to detect corrupt databases. */ - if (resultbuf->h_name[hst_resp->h_name_len - 1] != '\0' - || ({for (cnt = 0; cnt < hst_resp->h_aliases_cnt; ++cnt) + if (resultbuf->h_name[hst_resp.h_name_len - 1] != '\0' + || ({for (cnt = 0; cnt < hst_resp.h_aliases_cnt; ++cnt) if (resultbuf->h_aliases[cnt][aliases_len[cnt] - 1] != '\0') break; - cnt < hst_resp->h_aliases_cnt; })) - /* We cannot use the database. */ - goto out_close; + cnt < hst_resp.h_aliases_cnt; })) + { + /* We cannot use the database. */ + if (mapped->head->gc_cycle != gc_cycle) + retval = -2; + goto out_close; + } retval = 0; *result = resultbuf; @@ -358,7 +381,7 @@ nscd_gethst_r (const char *key, size_t k else { /* Store the error number. */ - *h_errnop = hst_resp->error; + *h_errnop = hst_resp.error; /* The `errno' to some value != ERANGE. */ __set_errno (ENOENT); @@ -370,19 +393,21 @@ nscd_gethst_r (const char *key, size_t k if (sock != -1) close_not_cancel_no_status (sock); out: - if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0 && retval != -1) + if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0) { /* When we come here this means there has been a GC cycle while we were looking for the data. This means the data might have been inconsistent. Retry if possible. */ - if ((gc_cycle & 1) != 0 || ++nretries == 5) + if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - __nscd_unmap (mapped); + if (atomic_decrement_val (&mapped->counter) == 0) + __nscd_unmap (mapped); mapped = NO_MAPPING; } - goto retry; + if (retval != -1) + goto retry; } return retval; diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_getpw_r.c glibc-2.5-branch/nscd/nscd_getpw_r.c --- glibc-2.5/nscd/nscd_getpw_r.c 2005-09-22 07:35:11.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_getpw_r.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -88,76 +89,81 @@ nscd_getpw_r (const char *key, size_t ke struct passwd **result) { int gc_cycle; + int nretries = 0; + /* If the mapping is available, try to search there instead of communicating with the nscd. */ struct mapped_database *mapped; mapped = __nscd_get_map_ref (GETFDPW, "passwd", &map_handle, &gc_cycle); retry:; - const pw_response_header *pw_resp = NULL; const char *pw_name = NULL; int retval = -1; const char *recend = (const char *) ~UINTMAX_C (0); + pw_response_header pw_resp; if (mapped != NO_MAPPING) { - const struct datahead *found = __nscd_cache_search (type, key, keylen, - mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); if (found != NULL) { - pw_resp = &found->data[0].pwdata; - pw_name = (const char *) (pw_resp + 1); + pw_name = (const char *) (&found->data[0].pwdata + 1); + pw_resp = found->data[0].pwdata; recend = (const char *) found->data + found->recsize; + /* Now check if we can trust pw_resp fields. If GC is + in progress, it can contain anything. */ + if (mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out; + } } } - pw_response_header pw_resp_mem; int sock = -1; - if (pw_resp == NULL) + if (pw_name == NULL) { - sock = __nscd_open_socket (key, keylen, type, &pw_resp_mem, - sizeof (pw_resp_mem)); + sock = __nscd_open_socket (key, keylen, type, &pw_resp, + sizeof (pw_resp)); if (sock == -1) { __nss_not_use_nscd_passwd = 1; goto out; } - - pw_resp = &pw_resp_mem; } /* No value found so far. */ *result = NULL; - if (__builtin_expect (pw_resp->found == -1, 0)) + if (__builtin_expect (pw_resp.found == -1, 0)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_passwd = 1; goto out_close; } - if (pw_resp->found == 1) + if (pw_resp.found == 1) { /* Set the information we already have. */ - resultbuf->pw_uid = pw_resp->pw_uid; - resultbuf->pw_gid = pw_resp->pw_gid; + resultbuf->pw_uid = pw_resp.pw_uid; + resultbuf->pw_gid = pw_resp.pw_gid; char *p = buffer; /* get pw_name */ resultbuf->pw_name = p; - p += pw_resp->pw_name_len; + p += pw_resp.pw_name_len; /* get pw_passwd */ resultbuf->pw_passwd = p; - p += pw_resp->pw_passwd_len; + p += pw_resp.pw_passwd_len; /* get pw_gecos */ resultbuf->pw_gecos = p; - p += pw_resp->pw_gecos_len; + p += pw_resp.pw_gecos_len; /* get pw_dir */ resultbuf->pw_dir = p; - p += pw_resp->pw_dir_len; + p += pw_resp.pw_dir_len; /* get pw_pshell */ resultbuf->pw_shell = p; - p += pw_resp->pw_shell_len; + p += pw_resp.pw_shell_len; ssize_t total = p - buffer; if (__builtin_expect (pw_name + total > recend, 0)) @@ -189,14 +195,14 @@ nscd_getpw_r (const char *key, size_t ke memcpy (resultbuf->pw_name, pw_name, total); /* Try to detect corrupt databases. */ - if (resultbuf->pw_name[pw_resp->pw_name_len - 1] != '\0' - || resultbuf->pw_passwd[pw_resp->pw_passwd_len - 1] != '\0' - || resultbuf->pw_gecos[pw_resp->pw_gecos_len - 1] != '\0' - || resultbuf->pw_dir[pw_resp->pw_dir_len - 1] != '\0' - || resultbuf->pw_shell[pw_resp->pw_shell_len - 1] != '\0') + if (resultbuf->pw_name[pw_resp.pw_name_len - 1] != '\0' + || resultbuf->pw_passwd[pw_resp.pw_passwd_len - 1] != '\0' + || resultbuf->pw_gecos[pw_resp.pw_gecos_len - 1] != '\0' + || resultbuf->pw_dir[pw_resp.pw_dir_len - 1] != '\0' + || resultbuf->pw_shell[pw_resp.pw_shell_len - 1] != '\0') { /* We cannot use the database. */ - retval = -1; + retval = mapped->head->gc_cycle != gc_cycle ? -2 : -1; goto out_close; } @@ -215,19 +221,21 @@ nscd_getpw_r (const char *key, size_t ke if (sock != -1) close_not_cancel_no_status (sock); out: - if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0 && retval != -1) + if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0) { /* When we come here this means there has been a GC cycle while we were looking for the data. This means the data might have been inconsistent. Retry if possible. */ - if ((gc_cycle & 1) != 0) + if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - __nscd_unmap (mapped); + if (atomic_decrement_val (&mapped->counter) == 0) + __nscd_unmap (mapped); mapped = NO_MAPPING; } - goto retry; + if (retval != -1) + goto retry; } return retval; diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_helper.c glibc-2.5-branch/nscd/nscd_helper.c --- glibc-2.5/nscd/nscd_helper.c 2006-04-25 16:47:53.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_helper.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1998-2002,2003,2004,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002,2003,2004,2005,2006,2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -186,6 +188,7 @@ get_mapping (request_type type, const ch request_header req; char key[keylen]; } reqdata; + size_t real_sizeof_reqdata = sizeof (request_header) + keylen; int sock = open_socket (); if (sock < 0) @@ -200,9 +203,9 @@ get_mapping (request_type type, const ch # define MSG_NOSIGNAL 0 # endif if (__builtin_expect (TEMP_FAILURE_RETRY (__send (sock, &reqdata, - sizeof (reqdata), + real_sizeof_reqdata, MSG_NOSIGNAL)) - != sizeof (reqdata), 0)) + != real_sizeof_reqdata, 0)) /* We cannot even write the request. */ goto out_close2; @@ -240,11 +243,12 @@ get_mapping (request_type type, const ch != keylen, 0)) goto out_close2; - mapfd = *(int *) CMSG_DATA (cmsg); + if (__builtin_expect (CMSG_FIRSTHDR (&msg) == NULL + || (CMSG_FIRSTHDR (&msg)->cmsg_len + != CMSG_LEN (sizeof (int))), 0)) + goto out_close2; - if (__builtin_expect (CMSG_FIRSTHDR (&msg)->cmsg_len - != CMSG_LEN (sizeof (int)), 0)) - goto out_close; + mapfd = *(int *) CMSG_DATA (cmsg); struct stat64 st; if (__builtin_expect (strcmp (resdata, key) != 0, 0) @@ -290,6 +294,7 @@ get_mapping (request_type type, const ch newp->data = ((char *) mapping + head.header_size + roundup (head.module * sizeof (ref_t), ALIGN)); newp->mapsize = size; + newp->datasize = head.data_size; /* Set counter to 1 to show it is usable. */ newp->counter = 1; @@ -340,7 +345,8 @@ __nscd_get_map_ref (request_type type, c /* If not mapped or timestamp not updated, request new map. */ if (cur == NULL || (cur->head->nscd_certainly_running == 0 - && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))) + && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL)) + || cur->head->data_size > cur->datasize) cur = get_mapping (type, name, (struct mapped_database **) &mapptr->mapped); @@ -360,28 +366,50 @@ __nscd_get_map_ref (request_type type, c } -const struct datahead * +/* Don't return const struct datahead *, as eventhough the record + is normally constant, it can change arbitrarily during nscd + garbage collection. */ +struct datahead * __nscd_cache_search (request_type type, const char *key, size_t keylen, const struct mapped_database *mapped) { unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module; + size_t datasize = mapped->datasize; ref_t work = mapped->head->array[hash]; - while (work != ENDREF) + while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) { struct hashentry *here = (struct hashentry *) (mapped->data + work); - if (type == here->type && keylen == here->len - && memcmp (key, mapped->data + here->key, keylen) == 0) +#ifndef _STRING_ARCH_unaligned + /* Although during garbage collection when moving struct hashentry + records around we first copy from old to new location and then + adjust pointer from previous hashentry to it, there is no barrier + between those memory writes. It is very unlikely to hit it, + so check alignment only if a misaligned load can crash the + application. */ + if ((uintptr_t) here & (__alignof__ (*here) - 1)) + return NULL; +#endif + + if (type == here->type + && keylen == here->len + && here->key + keylen <= datasize + && memcmp (key, mapped->data + here->key, keylen) == 0 + && here->packet + sizeof (struct datahead) <= datasize) { /* We found the entry. Increment the appropriate counter. */ - const struct datahead *dh + struct datahead *dh = (struct datahead *) (mapped->data + here->packet); +#ifndef _STRING_ARCH_unaligned + if ((uintptr_t) dh & (__alignof__ (*dh) - 1)) + return NULL; +#endif + /* See whether we must ignore the entry or whether something is wrong because garbage collection is in progress. */ - if (dh->usable && ((char *) dh + dh->allocsize - <= (char *) mapped->head + mapped->mapsize)) + if (dh->usable && here->packet + dh->allocsize <= datasize) return dh; } diff -pNur -x CVS -x libidn glibc-2.5/nscd/nscd_initgroups.c glibc-2.5-branch/nscd/nscd_initgroups.c --- glibc-2.5/nscd/nscd_initgroups.c 2006-09-29 10:05:21.000000000 -0700 +++ glibc-2.5-branch/nscd/nscd_initgroups.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -39,6 +39,7 @@ __nscd_getgrouplist (const char *user, g { size_t userlen = strlen (user) + 1; int gc_cycle; + int nretries = 0; /* If the mapping is available, try to search there instead of communicating with the nscd. */ @@ -46,44 +47,49 @@ __nscd_getgrouplist (const char *user, g mapped = __nscd_get_map_ref (GETFDGR, "group", &__gr_map_handle, &gc_cycle); retry:; - const initgr_response_header *initgr_resp = NULL; char *respdata = NULL; int retval = -1; int sock = -1; + initgr_response_header initgr_resp; if (mapped != NO_MAPPING) { - const struct datahead *found = __nscd_cache_search (INITGROUPS, user, - userlen, mapped); + struct datahead *found = __nscd_cache_search (INITGROUPS, user, + userlen, mapped); if (found != NULL) { - initgr_resp = &found->data[0].initgrdata; - respdata = (char *) (initgr_resp + 1); + respdata = (char *) (&found->data[0].initgrdata + 1); + initgr_resp = found->data[0].initgrdata; char *recend = (char *) found->data + found->recsize; - if (respdata + initgr_resp->ngrps * sizeof (int32_t) > recend) + /* Now check if we can trust initgr_resp fields. If GC is + in progress, it can contain anything. */ + if (mapped->head->gc_cycle != gc_cycle) + { + retval = -2; + goto out; + } + + if (respdata + initgr_resp.ngrps * sizeof (int32_t) > recend) goto out; } } /* If we do not have the cache mapped, try to get the data over the socket. */ - initgr_response_header initgr_resp_mem; - if (initgr_resp == NULL) + if (respdata == NULL) { - sock = __nscd_open_socket (user, userlen, INITGROUPS, &initgr_resp_mem, - sizeof (initgr_resp_mem)); + sock = __nscd_open_socket (user, userlen, INITGROUPS, &initgr_resp, + sizeof (initgr_resp)); if (sock == -1) { /* nscd not running or wrong version. */ __nss_not_use_nscd_group = 1; goto out; } - - initgr_resp = &initgr_resp_mem; } - if (initgr_resp->found == 1) + if (initgr_resp.found == 1) { /* The following code assumes that gid_t and int32_t are the same size. This is the case for al existing implementation. @@ -91,40 +97,40 @@ __nscd_getgrouplist (const char *user, g doesn't use memcpy but instead copies each array element one by one. */ assert (sizeof (int32_t) == sizeof (gid_t)); - assert (initgr_resp->ngrps >= 0); + assert (initgr_resp.ngrps >= 0); /* Make sure we have enough room. We always count GROUP in even though we might not end up adding it. */ - if (*size < initgr_resp->ngrps + 1) + if (*size < initgr_resp.ngrps + 1) { gid_t *newp = realloc (*groupsp, - (initgr_resp->ngrps + 1) * sizeof (gid_t)); + (initgr_resp.ngrps + 1) * sizeof (gid_t)); if (newp == NULL) /* We cannot increase the buffer size. */ goto out_close; *groupsp = newp; - *size = initgr_resp->ngrps + 1; + *size = initgr_resp.ngrps + 1; } if (respdata == NULL) { /* Read the data from the socket. */ - if ((size_t) __readall (sock, *groupsp, initgr_resp->ngrps + if ((size_t) __readall (sock, *groupsp, initgr_resp.ngrps * sizeof (gid_t)) - == initgr_resp->ngrps * sizeof (gid_t)) - retval = initgr_resp->ngrps; + == initgr_resp.ngrps * sizeof (gid_t)) + retval = initgr_resp.ngrps; } else { /* Just copy the data. */ - retval = initgr_resp->ngrps; + retval = initgr_resp.ngrps; memcpy (*groupsp, respdata, retval * sizeof (gid_t)); } } else { - if (__builtin_expect (initgr_resp->found == -1, 0)) + if (__builtin_expect (initgr_resp.found == -1, 0)) { /* The daemon does not cache this database. */ __nss_not_use_nscd_group = 1; @@ -153,19 +159,21 @@ __nscd_getgrouplist (const char *user, g if (sock != -1) close_not_cancel_no_status (sock); out: - if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0 && retval != -1) + if (__nscd_drop_map_ref (mapped, &gc_cycle) != 0) { /* When we come here this means there has been a GC cycle while we were looking for the data. This means the data might have been inconsistent. Retry if possible. */ - if ((gc_cycle & 1) != 0) + if ((gc_cycle & 1) != 0 || ++nretries == 5 || retval == -1) { /* nscd is just running gc now. Disable using the mapping. */ - __nscd_unmap (mapped); + if (atomic_decrement_val (&mapped->counter) == 0) + __nscd_unmap (mapped); mapped = NO_MAPPING; } - goto retry; + if (retval != -1) + goto retry; } return retval; diff -pNur -x CVS -x libidn glibc-2.5/nscd/pwdcache.c glibc-2.5-branch/nscd/pwdcache.c --- glibc-2.5/nscd/pwdcache.c 2006-04-26 10:27:51.000000000 -0700 +++ glibc-2.5-branch/nscd/pwdcache.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,5 @@ /* Cache handling for passwd lookup. - Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -274,6 +274,7 @@ cache_addpw (struct database_dyn *db, in { /* Adjust pointer into the memory block. */ cp = (char *) newp + (cp - (char *) dataset); + key_copy = (char *) newp + (key_copy - (char *) dataset); dataset = memcpy (newp, dataset, total + n); alloca_used = false; diff -pNur -x CVS -x libidn glibc-2.5/nscd/selinux.c glibc-2.5-branch/nscd/selinux.c --- glibc-2.5/nscd/selinux.c 2006-04-26 09:26:50.000000000 -0700 +++ glibc-2.5-branch/nscd/selinux.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,5 @@ /* SELinux access controls for nscd. - Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -182,18 +182,22 @@ preserve_capabilities (void) if (tmp_caps == NULL || new_caps == NULL) { if (tmp_caps != NULL) - free_caps (tmp_caps); + cap_free (tmp_caps); dbg_log (_("Failed to initialize drop of capabilities")); error (EXIT_FAILURE, 0, _("cap_init failed")); } /* There is no reason why these should not work. */ - cap_set_flag (new_caps, CAP_PERMITTED, nnew_cap_list, new_cap_list, CAP_SET); - cap_set_flag (new_caps, CAP_EFFECTIVE, nnew_cap_list, new_cap_list, CAP_SET); - - cap_set_flag (tmp_caps, CAP_PERMITTED, ntmp_cap_list, tmp_cap_list, CAP_SET); - cap_set_flag (tmp_caps, CAP_EFFECTIVE, ntmp_cap_list, tmp_cap_list, CAP_SET); + cap_set_flag (new_caps, CAP_PERMITTED, nnew_cap_list, + (cap_value_t *) new_cap_list, CAP_SET); + cap_set_flag (new_caps, CAP_EFFECTIVE, nnew_cap_list, + (cap_value_t *) new_cap_list, CAP_SET); + + cap_set_flag (tmp_caps, CAP_PERMITTED, ntmp_cap_list, + (cap_value_t *) tmp_cap_list, CAP_SET); + cap_set_flag (tmp_caps, CAP_EFFECTIVE, ntmp_cap_list, + (cap_value_t *) tmp_cap_list, CAP_SET); int res = cap_set_proc (tmp_caps); diff -pNur -x CVS -x libidn glibc-2.5/nscd/selinux.h glibc-2.5-branch/nscd/selinux.h --- glibc-2.5/nscd/selinux.h 2006-04-26 09:27:39.000000000 -0700 +++ glibc-2.5-branch/nscd/selinux.h 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,5 @@ /* Header for nscd SELinux access controls. - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -23,7 +23,7 @@ #include "nscd.h" #ifdef HAVE_LIBCAP -# include +# include #endif #ifdef HAVE_SELINUX diff -pNur -x CVS -x libidn glibc-2.5/nss/getXXbyYY_r.c glibc-2.5-branch/nss/getXXbyYY_r.c --- glibc-2.5/nss/getXXbyYY_r.c 2004-09-16 15:24:09.000000000 -0700 +++ glibc-2.5-branch/nss/getXXbyYY_r.c 2007-01-12 09:53:27.000000000 -0800 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #include #include #include "nsswitch.h" @@ -173,9 +174,6 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L startp = (service_user *) -1l; else { - startp = nip; - start_fct = fct.l; - #ifdef NEED__RES /* The resolver code will really be used so we have to initialize it. */ @@ -190,6 +188,11 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L if (!_res_hconf.initialized) _res_hconf_init (); #endif /* need _res_hconf */ + + start_fct = fct.l; + /* Make sure start_fct is written before startp. */ + atomic_write_barrier (); + startp = nip; } } else diff -pNur -x CVS -x libidn glibc-2.5/nss/nss_files/files-alias.c glibc-2.5-branch/nss/nss_files/files-alias.c --- glibc-2.5/nss/nss_files/files-alias.c 2002-09-01 05:38:05.000000000 -0700 +++ glibc-2.5-branch/nss/nss_files/files-alias.c 2007-01-12 07:56:58.000000000 -0800 @@ -1,5 +1,5 @@ /* Mail alias file parser in nss_files module. - Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc. + Copyright (C) 1996,97,98,99,2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -298,8 +298,8 @@ get_next_alias (const char *match, struc first_unused[room_left - 1] = '\0'; strncpy (first_unused, old_line, room_left); - if (old_line != NULL) - free (old_line); + free (old_line); + line = first_unused; if (first_unused[room_left - 1] != '\0') goto no_more_room; diff -pNur -x CVS -x libidn glibc-2.5/nss/nss_files/files-hosts.c glibc-2.5-branch/nss/nss_files/files-hosts.c --- glibc-2.5/nss/nss_files/files-hosts.c 2004-05-26 09:10:04.000000000 -0700 +++ glibc-2.5-branch/nss/nss_files/files-hosts.c 2007-07-12 09:58:07.000000000 -0700 @@ -1,5 +1,6 @@ /* Hosts file parser in nss_files module. - Copyright (C) 1996-2001, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2003, 2004, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -86,6 +87,10 @@ _nss_files_get##name##_r (proto, { \ enum nss_status status; \ \ + uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct hostent_data); \ + buffer += pad; \ + buflen = buflen > pad ? buflen - pad : 0; \ + \ __libc_lock_lock (lock); \ \ /* Reset file pointer to beginning or open file. */ \ @@ -106,7 +111,8 @@ _nss_files_get##name##_r (proto, { \ /* We have to get all host entries from the file. */ \ const size_t tmp_buflen = MIN (buflen, 4096); \ - char tmp_buffer[tmp_buflen]; \ + char tmp_buffer[tmp_buflen] \ + __attribute__ ((__aligned__ (__alignof__ (struct hostent_data))));\ struct hostent tmp_result_buf; \ int naddrs = 1; \ int naliases = 0; \ diff -pNur -x CVS -x libidn glibc-2.5/po/nl.po glibc-2.5-branch/po/nl.po --- glibc-2.5/po/nl.po 2006-09-20 21:16:48.000000000 -0700 +++ glibc-2.5-branch/po/nl.po 2007-01-12 07:55:11.000000000 -0800 @@ -1,3725 +1,4478 @@ -# Dutch translation of libc. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Translation of libc-2.5 to Dutch. +# Copyright (C) 2004, 2006 Free Software Foundation, Inc. # Elros Cyriatan , 2004. -# -# +# Benno Schulenberg , 2006. +# msgid "" msgstr "" -"Project-Id-Version: libc 2.3.3\n" +"Project-Id-Version: libc 2.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-05 09:16+0200\n" -"PO-Revision-Date: 2004-08-05 15:52+0200\n" -"Last-Translator: Elros Cyriatan \n" -"Language-Team: Dutch \n" +"POT-Creation-Date: 2006-09-29 11:38-0700\n" +"PO-Revision-Date: 2006-11-14 19:50+0100\n" +"Last-Translator: Benno Schulenberg \n" +"Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: sysdeps/generic/siglist.h:29 stdio-common/../sysdeps/unix/siglist.c:27 -msgid "Hangup" -msgstr "Ophangen" +#: argp/argp-help.c:227 +#, c-format +msgid "%.*s: ARGP_HELP_FMT parameter requires a value" +msgstr "%.*s: Parameter van ARGP_HELP_FMT vereist een waarde" -#: sysdeps/generic/siglist.h:30 stdio-common/../sysdeps/unix/siglist.c:28 -msgid "Interrupt" -msgstr "Onderbreken" +#: argp/argp-help.c:237 +#, c-format +msgid "%.*s: Unknown ARGP_HELP_FMT parameter" +msgstr "%.*s: Onbekende parameter van ARGP_HELP_FMT" -#: sysdeps/generic/siglist.h:31 stdio-common/../sysdeps/unix/siglist.c:29 -msgid "Quit" -msgstr "Afsluiten" +#: argp/argp-help.c:250 +#, c-format +msgid "Garbage in ARGP_HELP_FMT: %s" +msgstr "Rommel in ARGP_HELP_FMT: %s" -#: sysdeps/generic/siglist.h:32 stdio-common/../sysdeps/unix/siglist.c:30 -msgid "Illegal instruction" -msgstr "Ongeldige instructie" +#: argp/argp-help.c:1214 +msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." +msgstr "" +"Een argument dat verplicht of optioneel is voor een lange optie, is dat\n" +"ook voor de overeenkomstige korte optie." -#: sysdeps/generic/siglist.h:33 stdio-common/../sysdeps/unix/siglist.c:31 -msgid "Trace/breakpoint trap" -msgstr "Traceer/breekpunt val" +#: argp/argp-help.c:1600 +msgid "Usage:" +msgstr "Gebruik: " -#: sysdeps/generic/siglist.h:34 -msgid "Aborted" -msgstr "Geannuleerd" +#: argp/argp-help.c:1604 +msgid " or: " +msgstr " of: " -#: sysdeps/generic/siglist.h:35 stdio-common/../sysdeps/unix/siglist.c:34 -msgid "Floating point exception" -msgstr "Zwevende-punt uitzondering" +#: argp/argp-help.c:1616 +msgid " [OPTION...]" +msgstr " [OPTIE...]" -#: sysdeps/generic/siglist.h:36 stdio-common/../sysdeps/unix/siglist.c:35 -msgid "Killed" -msgstr "Gedood" +#: argp/argp-help.c:1643 +#, c-format +msgid "Try `%s --help' or `%s --usage' for more information.\n" +msgstr "Probeer '%s --help' of '%s --usage' voor meer informatie.\n" -#: sysdeps/generic/siglist.h:37 stdio-common/../sysdeps/unix/siglist.c:36 -msgid "Bus error" -msgstr "Bus fout" +#: argp/argp-help.c:1671 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Rapporteer fouten in het programma aan %s,\n" +"en gebreken in de vertaling aan .\n" -#: sysdeps/generic/siglist.h:38 stdio-common/../sysdeps/unix/siglist.c:37 -msgid "Segmentation fault" -msgstr "Segmentatie fout" +#: argp/argp-parse.c:102 +msgid "Give this help list" +msgstr "deze hulptekst tonen" -#. TRANS Broken pipe; there is no process reading from the other end of a pipe. -#. TRANS Every library function that returns this error code also generates a -#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled -#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE} -#. TRANS unless it has handled or blocked @code{SIGPIPE}. -#: sysdeps/generic/siglist.h:39 stdio-common/../sysdeps/gnu/errlist.c:351 -#: stdio-common/../sysdeps/unix/siglist.c:39 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62 -msgid "Broken pipe" -msgstr "Gebroken pijp" +#: argp/argp-parse.c:103 +msgid "Give a short usage message" +msgstr "een kort gebruiksbericht tonen" -#: sysdeps/generic/siglist.h:40 stdio-common/../sysdeps/unix/siglist.c:40 -msgid "Alarm clock" -msgstr "Alarmklok" +#: argp/argp-parse.c:104 +msgid "Set the program name" +msgstr "de programmanaam instellen" -#: sysdeps/generic/siglist.h:41 stdio-common/../sysdeps/unix/siglist.c:41 -msgid "Terminated" -msgstr "Afgebroken" +#: argp/argp-parse.c:106 +msgid "Hang for SECS seconds (default 3600)" +msgstr "dit aantal seconden pauzeren (standaard 3600)" -#: sysdeps/generic/siglist.h:42 stdio-common/../sysdeps/unix/siglist.c:42 -msgid "Urgent I/O condition" -msgstr "Spoedeisende I/O-omstandigheid" +#: argp/argp-parse.c:167 +msgid "Print program version" +msgstr "programmaversie tonen" -#: sysdeps/generic/siglist.h:43 stdio-common/../sysdeps/unix/siglist.c:43 -msgid "Stopped (signal)" -msgstr "Gestopt (signaal)" +#: argp/argp-parse.c:183 +msgid "(PROGRAM ERROR) No version known!?" +msgstr "**Interne programmafout**: geen versie bekend!?" -#: sysdeps/generic/siglist.h:44 stdio-common/../sysdeps/unix/siglist.c:44 -msgid "Stopped" -msgstr "Gestopt" +#: argp/argp-parse.c:623 +#, c-format +msgid "%s: Too many arguments\n" +msgstr "%s: Te veel argumenten\n" -#: sysdeps/generic/siglist.h:45 stdio-common/../sysdeps/unix/siglist.c:45 -msgid "Continued" -msgstr "Doorgegaan" +#: argp/argp-parse.c:766 +msgid "(PROGRAM ERROR) Option should have been recognized!?" +msgstr "**Interne programmafout**: optie had herkend moeten worden!?" -#: sysdeps/generic/siglist.h:46 stdio-common/../sysdeps/unix/siglist.c:46 -msgid "Child exited" -msgstr "Kind is afgesloten" +#: assert/assert-perr.c:57 +#, c-format +msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n" +msgstr "%s%s%s:%u: %s%sOnverwachte fout: %s.\n" -#: sysdeps/generic/siglist.h:47 stdio-common/../sysdeps/unix/siglist.c:47 -msgid "Stopped (tty input)" -msgstr "Gestopt (tty invoer)" +#: assert/assert.c:57 +#, c-format +msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n" +msgstr "%s%s%s:%u: %s%sControletest '%s' faalt.\n" -#: sysdeps/generic/siglist.h:48 stdio-common/../sysdeps/unix/siglist.c:48 -msgid "Stopped (tty output)" -msgstr "Gestopt (tty uitvoer)" +#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:96 nss/makedb.c:61 +msgid "NAME" +msgstr "NAAM" -#: sysdeps/generic/siglist.h:49 stdio-common/../sysdeps/unix/siglist.c:49 -msgid "I/O possible" -msgstr "I/O mogelijk" +#: catgets/gencat.c:110 +msgid "Create C header file NAME containing symbol definitions" +msgstr "headerbestand met symbooldefinities aanmaken" -#: sysdeps/generic/siglist.h:50 stdio-common/../sysdeps/unix/siglist.c:50 -msgid "CPU time limit exceeded" -msgstr "Grens processortijd overschreden" +#: catgets/gencat.c:112 +msgid "Do not use existing catalog, force new output file" +msgstr "bestaande catalogus niet gebruiken; een nieuw uitvoerbestand afdwingen" -#: sysdeps/generic/siglist.h:51 stdio-common/../sysdeps/unix/siglist.c:51 -msgid "File size limit exceeded" -msgstr "Grens bestandsgrootte overschreden" +#: catgets/gencat.c:113 nss/makedb.c:61 +msgid "Write output to file NAME" +msgstr "uitvoer naar dit bestand schrijven" -#: sysdeps/generic/siglist.h:52 stdio-common/../sysdeps/unix/siglist.c:52 -msgid "Virtual timer expired" -msgstr "Virtuele tijdopnemer verlopen" +#: catgets/gencat.c:118 +msgid "" +"Generate message catalog. If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n" +"is -, output is written to standard output.\n" +msgstr "" +"Een berichtencatalogus genereren.\n" +"\n" +"Als INVOERBESTAND '-' is, wordt van standaardinvoer gelezen.\n" +"Als UITVOERBESTAND '-' is, wordt naar standaarduitvoer geschreven.\n" -#: sysdeps/generic/siglist.h:53 stdio-common/../sysdeps/unix/siglist.c:53 -msgid "Profiling timer expired" -msgstr "Profilerende tijdopnemer verlopen" +#: catgets/gencat.c:123 +msgid "" +"-o OUTPUT-FILE [INPUT-FILE]...\n" +"[OUTPUT-FILE [INPUT-FILE]...]" +msgstr "" +"-o UITVOERBESTAND [INVOERBESTAND...]\n" +"[UITVOERBESTAND [INVOERBESTAND...]]" -#: sysdeps/generic/siglist.h:54 stdio-common/../sysdeps/unix/siglist.c:54 -msgid "Window changed" -msgstr "Venster veranderd" +#: catgets/gencat.c:231 debug/pcprofiledump.c:199 iconv/iconv_prog.c:410 +#: iconv/iconvconfig.c:379 locale/programs/localedef.c:370 +#: login/programs/pt_chown.c:88 malloc/memusagestat.c:525 nss/makedb.c:231 +msgid "" +"For bug reporting instructions, please see:\n" +".\n" +msgstr "" +"Voor het rapporteren van fouten, zie:\n" +" .\n" -#: sysdeps/generic/siglist.h:55 stdio-common/../sysdeps/unix/siglist.c:56 -msgid "User defined signal 1" -msgstr "Door gebruiker gedefinieerd signaal 1" +#: catgets/gencat.c:245 debug/xtrace.sh:64 elf/ldconfig.c:285 +#: elf/ldd.bash.in:39 elf/sprof.c:355 iconv/iconv_prog.c:425 +#: iconv/iconvconfig.c:394 locale/programs/locale.c:274 +#: locale/programs/localedef.c:386 login/programs/pt_chown.c:59 +#: malloc/memusage.sh:71 nscd/nscd.c:401 nss/getent.c:83 nss/makedb.c:245 +#: posix/getconf.c:1007 +#, c-format +msgid "" +"Copyright (C) %s Free Software Foundation, Inc.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"Copyright (C) %s Free Software Foundation, Inc.\n" +"Dit is vrije software; zie de brontekst voor de kopieervoorwaarden.\n" +"Er is GEEN garantie; zelfs niet van VERKOOPBAARHEID of GESCHIKTHEID\n" +"VOOR EEN BEPAALD DOEL.\n" + +#: catgets/gencat.c:250 debug/xtrace.sh:68 elf/ldconfig.c:290 elf/sprof.c:361 +#: iconv/iconv_prog.c:430 iconv/iconvconfig.c:399 locale/programs/locale.c:279 +#: locale/programs/localedef.c:391 malloc/memusage.sh:75 nscd/nscd.c:406 +#: nss/getent.c:88 nss/makedb.c:250 posix/getconf.c:1012 +#, c-format +msgid "Written by %s.\n" +msgstr "Geschreven door %s.\n" -#: sysdeps/generic/siglist.h:56 stdio-common/../sysdeps/unix/siglist.c:57 -msgid "User defined signal 2" -msgstr "Door gebruiker gedefinieerd signaal 2" +#: catgets/gencat.c:281 +msgid "*standard input*" +msgstr "*standaardinvoer*" -#: sysdeps/generic/siglist.h:60 stdio-common/../sysdeps/unix/siglist.c:33 -msgid "EMT trap" -msgstr "EMT-val" +#: catgets/gencat.c:287 iconv/iconv_charmap.c:157 iconv/iconv_prog.c:297 +#: nss/makedb.c:170 +#, c-format +msgid "cannot open input file `%s'" +msgstr "kan invoerbestand '%s' niet openen" -#: sysdeps/generic/siglist.h:63 stdio-common/../sysdeps/unix/siglist.c:38 -msgid "Bad system call" -msgstr "Slechte systeemaanroep" +#: catgets/gencat.c:416 catgets/gencat.c:493 +msgid "illegal set number" +msgstr "ongeldig verzamelingsnummer" -#: sysdeps/generic/siglist.h:66 -msgid "Stack fault" -msgstr "Stack fout" +#: catgets/gencat.c:443 +msgid "duplicate set definition" +msgstr "dubbele verzamelingsdefinitie" -#: sysdeps/generic/siglist.h:69 -msgid "Information request" -msgstr "Verzoek om informatie" +#: catgets/gencat.c:445 catgets/gencat.c:622 catgets/gencat.c:676 +msgid "this is the first definition" +msgstr "dit is de eerste definitie" -#: sysdeps/generic/siglist.h:71 -msgid "Power failure" -msgstr "Stroomstoring" +#: catgets/gencat.c:521 +#, c-format +msgid "unknown set `%s'" +msgstr "onbekende verzameling '%s'" -#: sysdeps/generic/siglist.h:74 stdio-common/../sysdeps/unix/siglist.c:55 -msgid "Resource lost" -msgstr "Bron verloren" +#: catgets/gencat.c:562 +msgid "invalid quote character" +msgstr "ongeldig aanhalingsteken" -#: sysdeps/mach/hurd/mips/dl-machine.c:68 -#: string/../sysdeps/mach/_strerror.c:57 -msgid "Error in unknown error system: " -msgstr "Fout in onbekende-fout systeem: " +#: catgets/gencat.c:575 +#, c-format +msgid "unknown directive `%s': line ignored" +msgstr "onbekende richting '%s'; regel is genegeerd" -#: sysdeps/mach/hurd/mips/dl-machine.c:83 -#: string/../sysdeps/generic/_strerror.c:44 -#: string/../sysdeps/mach/_strerror.c:87 -msgid "Unknown error " -msgstr "Onbekende fout " +#: catgets/gencat.c:620 +msgid "duplicated message number" +msgstr "dubbel berichtnummer" -#: sysdeps/unix/sysv/linux/lddlibc4.c:64 -#, c-format -msgid "cannot open `%s'" -msgstr "kan `%s' niet openen" +#: catgets/gencat.c:673 +msgid "duplicated message identifier" +msgstr "dubbele berichtnaam" -#: sysdeps/unix/sysv/linux/lddlibc4.c:68 +#: catgets/gencat.c:730 +msgid "invalid character: message ignored" +msgstr "ongeldig teken; bericht is genegeerd" + +#: catgets/gencat.c:773 +msgid "invalid line" +msgstr "ongeldige regel" + +#: catgets/gencat.c:827 +msgid "malformed line ignored" +msgstr "ongeldige regel is genegeerd" + +#: catgets/gencat.c:991 catgets/gencat.c:1032 nss/makedb.c:183 #, c-format -msgid "cannot read header from `%s'" -msgstr "kan kop van `%s' niet lezen" +msgid "cannot open output file `%s'" +msgstr "kan uitvoerbestand '%s' niet openen" + +#: catgets/gencat.c:1194 locale/programs/linereader.c:559 +msgid "invalid escape sequence" +msgstr "ongeldige stuurcode" + +#: catgets/gencat.c:1216 +msgid "unterminated message" +msgstr "onafgesloten bericht" -#: iconv/iconv_charmap.c:159 iconv/iconv_prog.c:295 catgets/gencat.c:288 +#: catgets/gencat.c:1240 #, c-format -msgid "cannot open input file `%s'" -msgstr "kan invoerbestand `%s' niet openen" +msgid "while opening old catalog file" +msgstr "bij openen van oude catalogusbestand" -#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:313 +#: catgets/gencat.c:1331 #, c-format -msgid "error while closing input `%s'" -msgstr "fout bij sluiten invoer `%s'" +msgid "conversion modules not available" +msgstr "conversiemodules zijn niet beschikbaar" -#: iconv/iconv_charmap.c:443 +#: catgets/gencat.c:1357 #, c-format -msgid "illegal input sequence at position %Zd" -msgstr "ongeldige invoerreeks op positie %Zd" +msgid "cannot determine escape character" +msgstr "kan niet bepalen wat het escapeteken is" -#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:506 -msgid "incomplete character or shift sequence at end of buffer" -msgstr "onvolledig teken en schuifreeks op einde van buffer" +#: debug/pcprofiledump.c:52 +msgid "Don't buffer output" +msgstr "uitvoer niet bufferen" -#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:543 iconv/iconv_prog.c:549 -#: iconv/iconv_prog.c:585 -msgid "error while reading the input" -msgstr "fout bij lezen van de invoer" +#: debug/pcprofiledump.c:57 +msgid "Dump information generated by PC profiling." +msgstr "Door prestatie-analyse gegenereerde informatie weergeven." -#: iconv/iconv_charmap.c:525 iconv/iconv_prog.c:567 -msgid "unable to allocate buffer for input" -msgstr "kan geen buffer toewijzen voor invoer" +#: debug/pcprofiledump.c:60 +msgid "[FILE]" +msgstr "[BESTAND]" -#: iconv/iconv_prog.c:61 -msgid "Input/Output format specification:" -msgstr "Invoer/Uitvoer formaatopgave:" +#: debug/pcprofiledump.c:100 +#, c-format +msgid "cannot open input file" +msgstr "kan invoerbestand niet openen" -#: iconv/iconv_prog.c:62 -msgid "encoding of original text" -msgstr "codering van oorspronkelijke tekst" +#: debug/pcprofiledump.c:106 +#, c-format +msgid "cannot read header" +msgstr "kan kop van bestand niet lezen" -#: iconv/iconv_prog.c:63 -msgid "encoding for output" -msgstr "codering van uitvoer" +#: debug/pcprofiledump.c:170 +#, c-format +msgid "invalid pointer size" +msgstr "ongeldige pointergrootte" -#: iconv/iconv_prog.c:64 -msgid "Information:" -msgstr "Informatie:" +#: debug/xtrace.sh:27 debug/xtrace.sh:45 +msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n" +msgstr "Gebruik: xtrace [OPTIE]... PROGRAMMA [PROGRAMMA-OPTIE]...\\n" + +#: debug/xtrace.sh:33 +msgid "Try `xtrace --help' for more information.\\n" +msgstr "Probeer 'xtrace --help' voor meer informatie.\\n" + +#: debug/xtrace.sh:39 +msgid "xtrace: option `$1' requires an argument.\\n" +msgstr "xtrace: optie '$1' vereist een argument\\n" -#: iconv/iconv_prog.c:65 -msgid "list all known coded character sets" -msgstr "alle bekende, gecodeerde tekensets opsommen" +#: debug/xtrace.sh:46 +msgid "" +"Trace execution of program by printing currently executed function.\n" +"\n" +" --data=FILE Don't run the program, just print the data from FILE.\n" +"\n" +" -?,--help Print this help and exit\n" +" --usage Give a short usage message\n" +" -V,--version Print version information and exit\n" +"\n" +"Mandatory arguments to long options are also mandatory for any corresponding\n" +"short options.\n" +"\n" +"For bug reporting instructions, please see:\n" +".\\n" +msgstr "" +"De uitvoering van een programma volgen door steeds de naam van\n" +"de uitgevoerde functie te printen.\n" +"\n" +" --data=BESTAND geen programma uitvoeren; gegevens uit BESTAND printen\n" +"\n" +" -?,--help deze hulptekst tonen\n" +" --usage een kort gebruiksbericht tonen\n" +" -V,--version versie-informatie tonen\n" +"\n" +"Voor het rapporteren van fouten in dit programma, zie:\n" +" .\\n" -#: iconv/iconv_prog.c:66 locale/programs/localedef.c:128 -msgid "Output control:" -msgstr "Uitvoerbeheer:" +#: debug/xtrace.sh:125 +msgid "xtrace: unrecognized option `$1'\\n" +msgstr "xtrace: onbekende optie '$1'\\n" + +#: debug/xtrace.sh:138 +msgid "No program name given\\n" +msgstr "Geen programmanaam gegeven\\n" + +#: debug/xtrace.sh:146 +#, sh-format +msgid "executable `$program' not found\\n" +msgstr "Geen uitvoerbaar bestand '$program' gevonden\\n" + +#: debug/xtrace.sh:150 +#, sh-format +msgid "`$program' is no executable\\n" +msgstr "'$program' is niet uitvoerbaar\\n" -#: iconv/iconv_prog.c:67 -msgid "omit invalid characters from output" -msgstr "ongeldige tekens overslaan in uitvoer" +#: dlfcn/dlinfo.c:67 +msgid "RTLD_SELF used in code not dynamically loaded" +msgstr "RTLD_SELF is gebruikt in code die niet dynamisch geladen is" -#: iconv/iconv_prog.c:68 -msgid "output file" -msgstr "uitvoerbestand" +#: dlfcn/dlinfo.c:76 +msgid "unsupported dlinfo request" +msgstr "niet-ondersteund 'dlinfo'-verzoek" -#: iconv/iconv_prog.c:69 -msgid "suppress warnings" -msgstr "waarschuwingen onderdrukken" +#: dlfcn/dlmopen.c:64 +msgid "invalid namespace" +msgstr "ongeldige naamsruimte" -#: iconv/iconv_prog.c:70 -msgid "print progress information" -msgstr "voortgangsinformatie weergeven" +#: dlfcn/dlmopen.c:69 +msgid "invalid mode" +msgstr "ongeldige modus" -#: iconv/iconv_prog.c:75 -msgid "Convert encoding of given files from one encoding to another." -msgstr "Gegeven bestanden converteren van ene codering naar andere." +#: dlfcn/dlopen.c:64 +msgid "invalid mode parameter" +msgstr "ongeldige modusparameter" -#: iconv/iconv_prog.c:79 -msgid "[FILE...]" -msgstr "[BESTAND...]" +#: elf/cache.c:67 +msgid "unknown" +msgstr "onbekend" -#: iconv/iconv_prog.c:201 -msgid "cannot open output file" -msgstr "kan uitvoerbestand niet openen" +#: elf/cache.c:110 +msgid "Unknown OS" +msgstr "onbekend besturingssysteem" -#: iconv/iconv_prog.c:243 +#: elf/cache.c:115 #, c-format -msgid "conversions from `%s' and to `%s' are not supported" -msgstr "conversie van `%s' en naar `%s' wordt niet ondersteund" +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS-ABI: %s %d.%d.%d" -#: iconv/iconv_prog.c:248 +#: elf/cache.c:141 elf/ldconfig.c:1231 #, c-format -msgid "conversion from `%s' is not supported" -msgstr "conversie van `%s' wordt niet ondersteund" +msgid "Can't open cache file %s\n" +msgstr "Kan cachebestand %s niet openen\n" -#: iconv/iconv_prog.c:255 +#: elf/cache.c:153 #, c-format -msgid "conversion to `%s' is not supported" -msgstr "conversie naar `%s' wordt niet ondersteund" +msgid "mmap of cache file failed.\n" +msgstr "mmap() van cachebestand is mislukt\n" -#: iconv/iconv_prog.c:259 +#: elf/cache.c:157 elf/cache.c:167 #, c-format -msgid "conversion from `%s' to `%s' is not supported" -msgstr "conversie van `%s' naar `%s' wordt niet ondersteund" - -#: iconv/iconv_prog.c:265 -msgid "failed to start conversion processing" -msgstr "beginnen conversieproces mislukt" - -#: iconv/iconv_prog.c:360 -msgid "error while closing output file" -msgstr "fout bij sluiten uitvoerbestand" +msgid "File is not a cache file.\n" +msgstr "Bestand is geen cachebestand\n" -#: iconv/iconv_prog.c:409 iconv/iconvconfig.c:357 locale/programs/locale.c:279 -#: locale/programs/localedef.c:372 catgets/gencat.c:233 -#: malloc/memusagestat.c:602 debug/pcprofiledump.c:199 -msgid "Report bugs using the `glibcbug' script to .\n" -msgstr "" -"Rapporteer fouten met het `glibcbug' script aan .\n" -"Neem voor fouten in de vertaling contact op met .\n" +#: elf/cache.c:200 elf/cache.c:210 +#, c-format +msgid "%d libs found in cache `%s'\n" +msgstr "%d bibliotheken gevonden in cache '%s'\n" -#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:371 locale/programs/locale.c:292 -#: locale/programs/localedef.c:386 catgets/gencat.c:246 posix/getconf.c:913 -#: nss/getent.c:74 nscd/nscd.c:355 nscd/nscd_nischeck.c:90 elf/ldconfig.c:274 -#: elf/sprof.c:349 +#: elf/cache.c:409 #, c-format -msgid "" -"Copyright (C) %s Free Software Foundation, Inc.\n" -"This is free software; see the source for copying conditions. There is NO\n" -"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" -msgstr "" -"Copyright (C) %s Free Software Foundation, Inc.\n" -"Dit is vrije software; zie de broncode voor kopieervoorwaarden. Er is GEEN\n" -"garantie; zelfs niet van VERKOOPBAARHEID of GESCHIKTHEID VOOR EEN BEPAALD\n" -"DOEL.\n" - -#: iconv/iconv_prog.c:428 iconv/iconvconfig.c:376 locale/programs/locale.c:297 -#: locale/programs/localedef.c:391 catgets/gencat.c:251 posix/getconf.c:918 -#: nss/getent.c:79 nscd/nscd.c:360 nscd/nscd_nischeck.c:95 elf/ldconfig.c:279 -#: elf/sprof.c:355 +msgid "Can't remove old temporary cache file %s" +msgstr "Kan oud tijdelijk cachebestand %s niet verwijderen" + +#: elf/cache.c:416 #, c-format -msgid "Written by %s.\n" -msgstr "" -"Geschreven door %s.\n" -"Vertaald door Elros Cyriatan.\n" +msgid "Can't create temporary cache file %s" +msgstr "Kan tijdelijk cachebestand %s niet aanmaken" -#: iconv/iconv_prog.c:458 iconv/iconv_prog.c:484 -msgid "conversion stopped due to problem in writing the output" -msgstr "conversie gestopt vanwege probleem bij schrijven van uitvoer" +#: elf/cache.c:424 elf/cache.c:434 elf/cache.c:438 +#, c-format +msgid "Writing of cache data failed" +msgstr "Schrijven van cachegegevens is mislukt" -#: iconv/iconv_prog.c:502 +#: elf/cache.c:442 #, c-format -msgid "illegal input sequence at position %ld" -msgstr "ongeldige invoerreeks op positie %ld" +msgid "Writing of cache data failed." +msgstr "Schrijven van cachegegevens is mislukt" -#: iconv/iconv_prog.c:510 -msgid "internal error (illegal descriptor)" -msgstr "interne fout (ongeldige beschrijver)" +#: elf/cache.c:449 +#, c-format +msgid "Changing access rights of %s to %#o failed" +msgstr "Wijzigen van toegangsrechten van %s naar %#o is mislukt" -#: iconv/iconv_prog.c:513 +#: elf/cache.c:454 #, c-format -msgid "unknown iconv() error %d" -msgstr "onbekende iconv() fout %d" +msgid "Renaming of %s to %s failed" +msgstr "Naamswijziging van %s naar %s is mislukt" -#: iconv/iconv_prog.c:756 -msgid "" -"The following list contain all the coded character sets known. This does\n" -"not necessarily mean that all combinations of these names can be used for\n" -"the FROM and TO command line parameters. One coded character set can be\n" -"listed with several different names (aliases).\n" -"\n" -" " -msgstr "" -"De volgende lijst bevat alle bekende, gecodeerde tekensets. Dit betekent\n" -"niet noodzakelijkerwijs dat alle combinaties van deze namen kunnen worden\n" -"gebruikt als parameters voor VAN en NAAR. Eén gecodeerde tekenset kan\n" -"worden genoemd met verschillende namen (aliasen).\n" -"\n" -" " +#: elf/dl-close.c:116 +msgid "shared object not open" +msgstr "gedeeld object is niet open" -#: iconv/iconvconfig.c:110 -msgid "Create fastloading iconv module configuration file." -msgstr "Snelladende iconv-module configuratiebestand maken." +#: elf/dl-deps.c:112 +msgid "DST not allowed in SUID/SGID programs" +msgstr "DST is niet toegestaan in SUID/SGID-programma's" -#: iconv/iconvconfig.c:114 -msgid "[DIR...]" -msgstr "[MAP...]" +#: elf/dl-deps.c:125 +msgid "empty dynamics string token substitution" +msgstr "lege vervanging van DST" -#: iconv/iconvconfig.c:126 -msgid "Prefix used for all file accesses" -msgstr "Voorvoegsel gebruikt voor alle bestandstoegang" +#: elf/dl-deps.c:131 +#, c-format +msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n" +msgstr "kan helper '%s' niet laden vanwege lege DST-vervanging\n" -#: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warnings were issued" -msgstr "geen uitvoerbestand gemaakt omdat waarschuwing is gegeven" +#: elf/dl-deps.c:472 +msgid "cannot allocate dependency list" +msgstr "kan geen geheugen reserveren voor afhankelijkhedenlijst" -#: iconv/iconvconfig.c:405 -msgid "while inserting in search tree" -msgstr "bij invoegen in zoekboom" +#: elf/dl-deps.c:505 elf/dl-deps.c:560 +msgid "cannot allocate symbol search list" +msgstr "kan geen geheugen reserveren voor symbolenzoeklijst" -#: iconv/iconvconfig.c:1204 -msgid "cannot generate output file" -msgstr "kan geen uitvoerbestand genereren" +#: elf/dl-deps.c:545 +msgid "Filters not supported with LD_TRACE_PRELINKING" +msgstr "Met LD_TRACE_PRELINKING worden filters niet ondersteund" -#: locale/programs/charmap-dir.c:59 -#, c-format -msgid "cannot read character map directory `%s'" -msgstr "kan tekenafbeelding-map `%s' niet lezen" +#: elf/dl-error.c:77 +msgid "DYNAMIC LINKER BUG!!!" +msgstr "FOUT IN DYNAMISCHE LINKER!!!" -#: locale/programs/charmap.c:136 -#, c-format -msgid "character map file `%s' not found" -msgstr "tekenafbeelding-bestand `%s' niet gevonden" +#: elf/dl-error.c:124 +msgid "error while loading shared libraries" +msgstr "fout bij laden van gedeelde bibliotheken" -#: locale/programs/charmap.c:194 -#, c-format -msgid "default character map file `%s' not found" -msgstr "standaard tekenafbeelding-bestand `%s' niet gevonden" +#: elf/dl-fptr.c:88 +msgid "cannot map pages for fdesc table" +msgstr "kan pagina's voor 'fdesc'-tabel niet in het geheugen plaatsen" -#: locale/programs/charmap.c:257 -#, c-format -msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" -msgstr "tekenafbeelding `%s' is niet ASCII-compatible, locale voldoet niet aan ISO C\n" +#: elf/dl-fptr.c:192 +msgid "cannot map pages for fptr table" +msgstr "kan pagina's voor 'fptr'-tabel niet in het geheugen plaatsen" -#: locale/programs/charmap.c:336 -#, c-format -msgid "%s: must be greater than \n" -msgstr "%s: moet groter zijn dan \n" +#: elf/dl-fptr.c:221 +msgid "internal error: symidx out of range of fptr table" +msgstr "**interne fout**: 'symidx' buiten bereik van 'fptr'-tabel" -#: locale/programs/charmap.c:356 locale/programs/charmap.c:373 -#: locale/programs/repertoire.c:175 -#, c-format -msgid "syntax error in prolog: %s" -msgstr "syntaxisfout in proloog: %s" +#: elf/dl-load.c:372 +msgid "cannot allocate name record" +msgstr "kan geen geheugen reserveren voor naamrecord" -#: locale/programs/charmap.c:357 -msgid "invalid definition" -msgstr "ongeldige definitie" +#: elf/dl-load.c:474 elf/dl-load.c:553 elf/dl-load.c:673 elf/dl-load.c:786 +msgid "cannot create cache for search path" +msgstr "kan cache voor zoekpad niet aanmaken" -#: locale/programs/charmap.c:374 locale/programs/locfile.c:126 -#: locale/programs/locfile.c:153 locale/programs/repertoire.c:176 -msgid "bad argument" -msgstr "fout argument" +#: elf/dl-load.c:576 +msgid "cannot create RUNPATH/RPATH copy" +msgstr "kan geen kopie van RUNPATH/RPATH maken" -#: locale/programs/charmap.c:402 -#, c-format -msgid "duplicate definition of <%s>" -msgstr "dubbele definitie van <%s>" +#: elf/dl-load.c:659 +msgid "cannot create search path array" +msgstr "kan zoekpad-array niet aanmaken" -#: locale/programs/charmap.c:409 -#, c-format -msgid "value for <%s> must be 1 or greater" -msgstr "waarde voor <%s> moet 1 of groter zijn" +#: elf/dl-load.c:870 +msgid "cannot stat shared object" +msgstr "kan gedeeld object niet vinden" -#: locale/programs/charmap.c:421 -#, c-format -msgid "value of <%s> must be greater or equal than the value of <%s>" -msgstr "waarde voor <%s> moet groter dan of gelijk zijn aan de waarde van <%s>" +#: elf/dl-load.c:940 +msgid "cannot open zero fill device" +msgstr "kan nullenapparaat niet openen" -#: locale/programs/charmap.c:444 locale/programs/repertoire.c:184 -#, c-format -msgid "argument to <%s> must be a single character" -msgstr "argument voor <%s> moet een enkel teken zijn" +#: elf/dl-load.c:985 elf/dl-load.c:2215 +msgid "cannot create shared object descriptor" +msgstr "kan descriptor voor gedeeld object niet aanmaken" -#: locale/programs/charmap.c:470 -msgid "character sets with locking states are not supported" -msgstr "tekensets met blokkerende toestanden worden niet ondersteund" +#: elf/dl-load.c:1004 elf/dl-load.c:1663 elf/dl-load.c:1755 +msgid "cannot read file data" +msgstr "kan bestandsgegevens niet lezen" -#: locale/programs/charmap.c:497 locale/programs/charmap.c:551 -#: locale/programs/charmap.c:583 locale/programs/charmap.c:677 -#: locale/programs/charmap.c:732 locale/programs/charmap.c:773 -#: locale/programs/charmap.c:814 -#, c-format -msgid "syntax error in %s definition: %s" -msgstr "syntaxisfout in definitie %s: %s" +#: elf/dl-load.c:1048 +msgid "ELF load command alignment not page-aligned" +msgstr "uitlijning in ELF-laadopdracht ligt niet op een paginagrens" -#: locale/programs/charmap.c:498 locale/programs/charmap.c:678 -#: locale/programs/charmap.c:774 locale/programs/repertoire.c:231 -msgid "no symbolic name given" -msgstr "geen symbolische naam gegeven" +#: elf/dl-load.c:1055 +msgid "ELF load command address/offset not properly aligned" +msgstr "adres/positie in ELF-laadopdracht is niet correct uitgelijnd" -#: locale/programs/charmap.c:552 -msgid "invalid encoding given" -msgstr "ongeldige codering gegeven" +#: elf/dl-load.c:1139 +msgid "cannot allocate TLS data structures for initial thread" +msgstr "kan geen geheugen reserveren voor TLS-gegevensstructuren van initiële thread" -#: locale/programs/charmap.c:561 -msgid "too few bytes in character encoding" -msgstr "te weinig bytes in tekencodering" +#: elf/dl-load.c:1163 +msgid "cannot handle TLS data" +msgstr "kan TLS-gegevens niet verwerken" -#: locale/programs/charmap.c:563 -msgid "too many bytes in character encoding" -msgstr "teveel bytes in tekencodering" +#: elf/dl-load.c:1182 +msgid "object file has no loadable segments" +msgstr "objectbestand heeft geen laadbare segmenten" -#: locale/programs/charmap.c:585 locale/programs/charmap.c:733 -#: locale/programs/charmap.c:816 locale/programs/repertoire.c:297 -msgid "no symbolic name given for end of range" -msgstr "geen symbolische naam gegeven voor einde-van-bereik" +#: elf/dl-load.c:1218 +msgid "failed to map segment from shared object" +msgstr "kan segment van gedeeld object niet in het geheugen plaatsen" -#: locale/programs/charmap.c:609 locale/programs/locfile.c:818 -#: locale/programs/repertoire.c:314 -#, c-format -msgid "`%1$s' definition does not end with `END %1$s'" -msgstr "`%1$s' definitie eindigt niet met `END %1$s'" +#: elf/dl-load.c:1242 +msgid "cannot dynamically load executable" +msgstr "kan uitvoerbaar bestand niet dynamisch laden" -#: locale/programs/charmap.c:642 -msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" -msgstr "slechts WIDTH (breedte) definities zijn toegestaan opvolgend op de CHARMAP (tekenafbeelding) definitie" +#: elf/dl-load.c:1303 +msgid "cannot change memory protections" +msgstr "kan geheugenbeschermingen niet veranderen" -#: locale/programs/charmap.c:650 locale/programs/charmap.c:713 -#, c-format -msgid "value for %s must be an integer" -msgstr "waarde voor %s moet een geheel getal zijn" +#: elf/dl-load.c:1322 +msgid "cannot map zero-fill pages" +msgstr "kan nul-gevulde pagina's niet in het geheugen plaatsen" -#: locale/programs/charmap.c:841 -#, c-format -msgid "%s: error in state machine" -msgstr "%s: fout in toestandenmachine" +#: elf/dl-load.c:1336 +msgid "object file has no dynamic section" +msgstr "objectbestand heeft geen dynamische sectie" -#: locale/programs/charmap.c:849 locale/programs/ld-address.c:605 -#: locale/programs/ld-collate.c:2650 locale/programs/ld-collate.c:3818 -#: locale/programs/ld-ctype.c:2225 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-identification.c:469 -#: locale/programs/ld-measurement.c:255 locale/programs/ld-messages.c:349 -#: locale/programs/ld-monetary.c:958 locale/programs/ld-name.c:324 -#: locale/programs/ld-numeric.c:392 locale/programs/ld-paper.c:258 -#: locale/programs/ld-telephone.c:330 locale/programs/ld-time.c:1219 -#: locale/programs/locfile.c:825 locale/programs/repertoire.c:325 -#, c-format -msgid "%s: premature end of file" -msgstr "%s: vroegtijdig einde-van-bestand" +#: elf/dl-load.c:1359 +msgid "shared object cannot be dlopen()ed" +msgstr "gedeeld object kan niet met dlopen() geopend worden -- heeft DF_1_NOOPEN-vlag" -#: locale/programs/charmap.c:868 locale/programs/charmap.c:879 -#, c-format -msgid "unknown character `%s'" -msgstr "onbekend teken `%s'" +#: elf/dl-load.c:1372 +msgid "cannot allocate memory for program header" +msgstr "kan geen geheugen reserveren voor programmakop" -#: locale/programs/charmap.c:887 -#, c-format -msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d" -msgstr "aantal bytes voor bytereeks zijn voor begin en einde van bereik niet hetzelfde: %d tegenover %d" +#: elf/dl-load.c:1389 elf/dl-open.c:174 +msgid "invalid caller" +msgstr "ongeldige aanroeper" -#: locale/programs/charmap.c:991 locale/programs/ld-collate.c:2930 -#: locale/programs/repertoire.c:420 -msgid "invalid names for character range" -msgstr "ongeldige namen voor tekenbereik" +#: elf/dl-load.c:1428 +msgid "cannot enable executable stack as shared object requires" +msgstr "kan uitvoerbare stack niet aanzetten zoals gedeeld object vereist" -#: locale/programs/charmap.c:1003 locale/programs/repertoire.c:432 -msgid "hexadecimal range format should use only capital characters" -msgstr "hexadecimaal bereikformaat moet alleen hoofdletters gebruiken" +#: elf/dl-load.c:1443 +msgid "cannot close file descriptor" +msgstr "kan bestandsdescriptor niet sluiten" -#: locale/programs/charmap.c:1021 -#, c-format -msgid "<%s> and <%s> are illegal names for range" -msgstr "<%s> en <%s> zijn ongeldige namen voor bereik" +#: elf/dl-load.c:1485 +msgid "cannot create searchlist" +msgstr "kan zoeklijst niet aanmaken" -#: locale/programs/charmap.c:1027 -msgid "upper limit in range is not higher then lower limit" -msgstr "bovengrens in bereik is niet hoger dan ondergrens" +#: elf/dl-load.c:1663 +msgid "file too short" +msgstr "bestand is te kort" -#: locale/programs/charmap.c:1085 -msgid "resulting bytes for range not representable." -msgstr "resulterende bytes voor bereik zijn niet te representeren." +#: elf/dl-load.c:1692 +msgid "invalid ELF header" +msgstr "ongeldige ELF-header" -#: locale/programs/ld-address.c:134 locale/programs/ld-collate.c:1534 -#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:134 -#: locale/programs/ld-measurement.c:95 locale/programs/ld-messages.c:98 -#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:95 -#: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:92 -#: locale/programs/ld-telephone.c:95 locale/programs/ld-time.c:160 -#, c-format -msgid "No definition for %s category found" -msgstr "Geen definitie gevonden voor categorie %s" +#: elf/dl-load.c:1704 +msgid "ELF file data encoding not big-endian" +msgstr "gegevenscodering van ELF-bestand is niet big-endian" -#: locale/programs/ld-address.c:145 locale/programs/ld-address.c:183 -#: locale/programs/ld-address.c:201 locale/programs/ld-address.c:228 -#: locale/programs/ld-address.c:290 locale/programs/ld-address.c:309 -#: locale/programs/ld-address.c:322 locale/programs/ld-identification.c:147 -#: locale/programs/ld-measurement.c:106 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:106 -#: locale/programs/ld-name.c:143 locale/programs/ld-numeric.c:113 -#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:103 -#: locale/programs/ld-paper.c:112 locale/programs/ld-telephone.c:106 -#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:176 -#: locale/programs/ld-time.c:197 -#, c-format -msgid "%s: field `%s' not defined" -msgstr "%s: veld `%s' niet gedefinieerd" +#: elf/dl-load.c:1706 +msgid "ELF file data encoding not little-endian" +msgstr "gegevenscodering van ELF-bestand is niet little-endian" -#: locale/programs/ld-address.c:157 locale/programs/ld-address.c:209 -#: locale/programs/ld-address.c:235 locale/programs/ld-address.c:265 -#: locale/programs/ld-name.c:118 locale/programs/ld-telephone.c:118 -#, c-format -msgid "%s: field `%s' must not be empty" -msgstr "%s: veld `%s' mag niet leeg zijn" +#: elf/dl-load.c:1710 +msgid "ELF file version ident does not match current one" +msgstr "ELF-bestands-identversie komt niet overeen met huidige" -#: locale/programs/ld-address.c:169 -#, c-format -msgid "%s: invalid escape `%%%c' sequence in field `%s'" -msgstr "%s: ongeldige stuurcode `%%%c' in veld `%s'" +#: elf/dl-load.c:1714 +msgid "ELF file OS ABI invalid" +msgstr "OS-ABI van ELF-bestand is ongeldig" -#: locale/programs/ld-address.c:220 -#, c-format -msgid "%s: terminology language code `%s' not defined" -msgstr "%s: terminologie taalcode `%s' niet gedefinieerd" +#: elf/dl-load.c:1716 +msgid "ELF file ABI version invalid" +msgstr "ABI-versie van ELF-bestand is ongeldig" -#: locale/programs/ld-address.c:247 locale/programs/ld-address.c:276 -#, c-format -msgid "%s: language abbreviation `%s' not defined" -msgstr "%s: taal afkorting `%s' niet gedefinieerd" +#: elf/dl-load.c:1719 +msgid "internal error" +msgstr "**interne fout**" -#: locale/programs/ld-address.c:254 locale/programs/ld-address.c:282 -#: locale/programs/ld-address.c:316 locale/programs/ld-address.c:328 -#, c-format -msgid "%s: `%s' value does not match `%s' value" -msgstr "%s: `%s'