]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20060825T0639
authorJakub Jelinek <jakub@redhat.com>
Fri, 25 Aug 2006 06:45:16 +0000 (06:45 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 25 Aug 2006 06:45:16 +0000 (06:45 +0000)
25 files changed:
ChangeLog
elf/Makefile
elf/dl-addr.c
elf/tst-addr1.c [new file with mode: 0644]
fedora/branch.mk
fedora/glibc.spec.in
locale/programs/ld-ctype.c
localedata/ChangeLog
localedata/locales/bn_BD
localedata/locales/en_NZ
localedata/locales/et_EE
localedata/locales/nn_NO
malloc/malloc.c
malloc/tst-malloc.c
nptl/ChangeLog
nptl/allocatestack.c
nptl/init.c
nptl/pthreadP.h
nptl/sysdeps/pthread/pthread-functions.h
nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
posix/bits/unistd.h
posix/unistd.h
sysdeps/generic/ldsodefs.h
sysdeps/i386/bits/byteswap.h
sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h

index 2adc7bb44f9f1e5afd4fc44767971d55d3213c01..b95ea69c5e8e2bfa37cd8166258a7416018c6192 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2006-08-24  Ulrich Drepper  <drepper@redhat.com>
+
+       * locale/programs/ld-ctype.c (ctype_read): If CTYPE is NULL, don't
+       do anything.
+
+       * sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): For undefined
+       symbol require exact match (these are PLTs).
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
+       (_dl_ppc64_addr_sym_match): Likewise.
+
+       [BZ #2683]
+       * elf/dl-addr.c (_dl_addr): Don't ignore all undefined symbols.
+       If symbol has a value use it.
+       * elf/tst-dladdr1.c: New file.
+       * elf/Makefile: Add rules to build and run tst-addr1.
+
+2006-08-24  Jakub Jelinek  <jakub@redhat.com>
+
+       * malloc/malloc.c (sYSMALLOc): Avoid infinite loop if MMAP
+       keeps failing and heap growth or new heap creation isn't
+       successful either.
+       * malloc/tst-malloc.c (main): Add new tests.
+
+2006-08-24  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2734]
+       * sysdeps/i386/bits/byteswap.h (__bswap_32): Use same conditions
+       as in the x86-64 code to use bswap.
+
+2006-05-21  Joseph S. Myers  <joseph@codesourcery.com>
+
+       [BZ #2680]
+       * posix/unistd.h (getlogin_r): Condition on __USE_POSIX199506, not
+       __USE_UNIX98.
+       * posix/bits/unistd.h: Likewise.
+
 2006-05-15  Mike Frysinger  <vapier@gentoo.org>
 
        [BZ #2751]
index 402fc18636671ddf5b215c75e3c8c432446ee3d0..6f4b0260c067a3ddc10754d6f3aa0563e1ff36e1 100644 (file)
@@ -170,7 +170,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
         tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
         unload3 unload4 unload5 unload6 tst-global1 order2 \
         tst-audit1 tst-audit2 \
-        tst-stackguard1
+        tst-stackguard1 tst-addr1
 #       reldep9
 test-srcs = tst-pathopt
 tests-vis-yes = vismain
@@ -906,3 +906,5 @@ $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
        $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@
 
 tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace
+
+$(objpfx)tst-addr1: $(libdl)
index 5d3719adb23eeb190e23dd173c6aba8ef8e6cbfe..720b24d04b962fc5fb296fcfc30afc2cdaf1d3a9 100644 (file)
@@ -91,7 +91,8 @@ _dl_addr (const void *address, Dl_info *info,
                    {
                      /* The hash table never references local symbols
                         so we can omit that test here.  */
-                     if (symtab[symndx].st_shndx != SHN_UNDEF
+                     if ((symtab[symndx].st_shndx != SHN_UNDEF
+                          || symtab[symndx].st_value != 0)
 #ifdef USE_TLS
                          && ELFW(ST_TYPE) (symtab[symndx].st_info) != STT_TLS
 #endif
@@ -125,7 +126,8 @@ _dl_addr (const void *address, Dl_info *info,
 #ifdef USE_TLS
                && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS
 #endif
-               && symtab->st_shndx != SHN_UNDEF
+               && (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;
diff --git a/elf/tst-addr1.c b/elf/tst-addr1.c
new file mode 100644 (file)
index 0000000..3a2cbb6
--- /dev/null
@@ -0,0 +1,19 @@
+#include <dlfcn.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+  Dl_info i;
+  if (dladdr (&printf, &i) == 0)
+    {
+      puts ("not found");
+      return 1;
+    }
+  printf ("found symbol %s in %s\n", i.dli_sname, i.dli_fname);
+  return i.dli_sname == NULL || strcmp (i.dli_sname, "printf") != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 86bc40a3e5ea4b8b80ca432a417a140df337f340..fb723d026ce708243bee86e46703be6004ecac48 100644 (file)
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2006-08-22 07:06 UTC
-fedora-sync-tag := fedora-glibc-20060822T0706
+fedora-sync-date := 2006-08-25 06:39 UTC
+fedora-sync-tag := fedora-glibc-20060825T0639
index 251854997b5a712f417536a9a81ca1e3f44fb1ef..f265ce6a137dc63dda3f66929c35d5cab5f6b023 100644 (file)
@@ -1142,7 +1142,7 @@ echo ====================TESTING=========================
 cd build-%{nptl_target_cpu}-linuxnptl
 ( make %{?_smp_mflags} -k check PARALLELMFLAGS=-s 2>&1
   sleep 10s
-  teepid="`ps -eo ppid,pid,command | grep ^${parent}' [0-9]\+ tee' | cut -d' ' -f2`"
+  teepid="`ps -eo ppid,pid,command | grep ^${parent}'[         ]\+[0-9]\+[     ]\+tee' | cut -d' ' -f2`"
   [ -n "$teepid" ] && kill $teepid
 ) | tee check.log || :
 cd ..
@@ -1151,7 +1151,7 @@ echo ====================TESTING -mno-tls-direct-seg-refs=============
 cd build-%{nptl_target_cpu}-linuxnptl-nosegneg
 ( make -j$numprocs -k check PARALLELMFLAGS=-s 2>&1
   sleep 10s
-  teepid="`ps -eo ppid,pid,command | grep ^${parent}' [0-9]\+ tee' | cut -d' ' -f2`"
+  teepid="`ps -eo ppid,pid,command | grep ^${parent}'[         ]\+[0-9]\+[     ]\+tee' | cut -d' ' -f2`"
   [ -n "$teepid" ] && kill $teepid
 ) | tee check.log || :
 cd ..
index f38231f984b9e09f06406189c22a02b22c17fd28..0ffda62e2977ad72e6b3fd9cd99e986d3188ccb9 100644 (file)
@@ -2256,6 +2256,8 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result,
   /* Prepare the data structures.  */
   ctype_startup (ldfile, result, charmap, copy_locale, ignore_content);
   ctype = result->categories[LC_CTYPE].ctype;
+  if (ctype == NULL)
+    return;
 
   /* Remember the repertoire we use.  */
   if (!ignore_content)
index b7ec81b992246f2e53643af065002e456d852b92..df443666578a19292534986c4ae905f86acf4c76 100644 (file)
@@ -1,3 +1,21 @@
+2006-08-24  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2695]
+       * locales/et_EE: Update LC_ADDRESS category.
+       Patch by Priit Laes <amd@store20.com>.
+
+2006-08-23  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2662]
+       * locales/bn_BD: Fix abday and day spelling of Tuesday.
+
+       [BZ #2473]
+       * locales/en_NZ: Define am/pm formats.
+
+2006-08-22  Ulrich Drepper  <drepper@redhat.com>
+
+       * locales/nn_NO: Copy more categories from nb_NO.
+
 2006-08-19  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #3034]
index 196b42dbc3b626320e06bd4847ad127a5796368f..23f821ad6ece9b5c3a7dd67d7e72d7a2618bd7be 100644 (file)
@@ -73,7 +73,7 @@ END LC_NUMERIC
 LC_TIME
 abday       "<U09B0><U09AC><U09BF>"; /
             "<U09B8><U09CB><U09AE>";/
-            "<U09AE><U0999><U0997><U09B2>";/
+            "<U09AE><U0999><U09CD><U0997><U09B2>";/
             "<U09AC><U09C1><U09A7>";/
             "<U09AC><U09C3><U09B9><U0983>";/
             "<U09B6><U09C1><U0995><U09CD><U09B0>";/
@@ -81,7 +81,7 @@ abday       "<U09B0><U09AC><U09BF>"; /
 
 day         "<U09B0><U09AC><U09BF><U09AC><U09BE><U09B0>";/
             "<U09B8><U09CB><U09AE><U09AC><U09BE><U09B0>";/
-            "<U09AE><U0999><U0997><U09B2><U09AC><U09BE><U09B0>";/
+            "<U09AE><U0999><U09CD><U0997><U09B2><U09AC><U09BE><U09B0>";/
             "<U09AC><U09C1><U09A7><U09AC><U09BE><U09B0>";/
             "<U09AC><U09C3><U09B9><U09B8><U09CD><U09AA><U09A4><U09BF><U09AC><U09BE><U09B0>";/
             "<U09B6><U09C1><U0995><U09CD><U09B0><U09AC><U09BE><U09B0>";/
index d3f7e636cfef4113d3f0ecb1ed1f5d5bb254189a..82470f57c38ac91735a3ad57f81fbb23461faee0 100644 (file)
@@ -111,8 +111,9 @@ mon         "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
 d_t_fmt     "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
 d_fmt       "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
 t_fmt       "<U0025><U0054>"
-am_pm       "";""
-t_fmt_ampm  ""
+am_pm       "<U0041><U004D>";"<U0050><U004D>"
+t_fmt_ampm  "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U0070>"
 date_fmt       "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
 <U0025><U005A><U0020><U0025><U0059>"
index 3c70cdf6242fb58bf403f8ade3e4ff8a68d403a9..e44e0c88c7ba17db53d82222cfeba812f9e3cf5a 100644 (file)
@@ -2228,12 +2228,22 @@ name_fmt    "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
 END LC_NAME
 
 LC_ADDRESS
-postal_fmt    "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
-<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
-<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
-<U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
-<U004E><U0025><U0063><U0025><U004E>"
-country_ab2 "<U0045><U0045>"
-country_ab3 "<U0045><U0053><U0054>"
-country_num 233
+postal_fmt      "<U0025><U0061><U0025><U004E>/
+                 <U0025><U0066><U0025><U004E>/
+                 <U0025><U0064><U0025><U004E>/
+                 <U0025><U0062><U0025><U004E>/
+                 <U0025><U0073><U0025><U0074><U0025><U0068><U0025><U0074><U0025><U0065><U0025><U0074><U0025><U0072><U0025><U004E>/
+                 <U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025><U004E>/
+                 <U0025><U0063><U0025><U004E>"
+country_name    "<U0045><U0065><U0073><U0074><U0069>"
+country_post    "<U0045><U0045>"
+country_ab2     "<U0045><U0045>"
+country_ab3     "<U0045><U0053><U0054>"
+country_num     233
+country_car     "<U0045><U0053><U0054>"
+country_isbn    "<U0039><U0039><U0038><U0035>"
+lang_name       "<U0065><U0065><U0073><U0074><U0069><U0020><U006B><U0065><U0065><U006C>"
+lang_ab         "<U0065><U0074>"
+lang_term       "<U0065><U0073><U0074>"
+lang_lib        "<U0065><U0073><U0074>"
 END LC_ADDRESS
index 097fbbc18c8b542dda921f9d6c705d49be075313..eb060edcced229e554fd861f867db73b996ef9fb 100644 (file)
@@ -65,12 +65,7 @@ END LC_MONETARY
 
 
 LC_NUMERIC
-% This is the POSIX Locale definition for the LC_NUMERIC  category.
-%
-decimal_point          "<U002C>"
-thousands_sep          "<U00A0>"
-grouping               3
-%
+copy "nb_NO"
 END LC_NUMERIC
 
 
@@ -151,40 +146,25 @@ END LC_MESSAGES
 
 
 LC_PAPER
-height      297
-width       210
+copy "nb_NO"
 END LC_PAPER
 
 
 LC_NAME
-name_fmt    "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
-<U0025><U006D><U0025><U0074><U0025><U0066>"
+copy "nb_NO"
 END LC_NAME
 
 
 LC_ADDRESS
-postal_fmt    "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
-<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
-<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
-<U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
-<U004E><U0025><U0063><U0025><U004E>"
-country_ab2 "<U004E><U004F>"
-country_ab3 "<U004E><U004F><U0052>"
-country_num 578
+copy "nb_NO"
 END LC_ADDRESS
 
 
 LC_TELEPHONE
-tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U006C>"
-tel_dom_fmt    "<U0025><U006C>"
-int_select     "<U0030><U0030>"
-int_prefix     "<U0034><U0037>"
+copy "nb_NO"
 END LC_TELEPHONE
 
 
 LC_MEASUREMENT
-% This is the ISO_IEC TR14652 Locale definition for the
-%
-measurement 1
-
+copy "nb_NO"
 END LC_MEASUREMENT
index 02f659708d6ec038f0c4ccaa096b9400f000ca0c..6de1409c4fc6bd0b80b53e110833aa978defe000 100644 (file)
@@ -2860,6 +2860,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
   unsigned long   sum;            /* for updating stats */
 
   size_t          pagemask  = mp_.pagesize - 1;
+  bool            tried_mmap = false;
 
 
 #if HAVE_MMAP
@@ -2883,6 +2884,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
       is no following chunk whose prev_size field could be used.
     */
     size = (nb + SIZE_SZ + MALLOC_ALIGN_MASK + pagemask) & ~pagemask;
+    tried_mmap = true;
 
     /* Don't try if size wraps around 0 */
     if ((unsigned long)(size) > (unsigned long)(nb)) {
@@ -3006,7 +3008,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
        set_foot(old_top, (old_size + 2*SIZE_SZ));
       }
     }
-    else
+    else if (!tried_mmap)
       /* We can at least try to use to mmap memory.  */
       goto try_mmap;
 
index d555ae46ef15b8fba05907846fc57de7400bd23d..81d279236c91cd531d19d04182b6a6afebb1d453 100644 (file)
@@ -33,7 +33,7 @@ merror (const char *msg)
 int
 main (void)
 {
-  void *p;
+  void *p, *q;
   int save;
 
   errno = 0;
@@ -64,5 +64,15 @@ main (void)
   if (p != NULL)
     merror ("realloc (p, 0) failed.");
 
+  p = malloc (513 * 1024);
+  if (p == NULL)
+    merror ("malloc (513K) failed.");
+
+  q = malloc (-512 * 1024);
+  if (q != NULL)
+    merror ("malloc (-512K) succeeded.");
+
+  free (p);
+
   return errors != 0;
 }
index 2dee6abb006112d3d82fd909de6a3dd93c0c7017..07a1d2f7a735b7a77944494089fa53648f5545e2 100644 (file)
@@ -1,3 +1,15 @@
+2006-08-23  Ulrich Drepper  <drepper@redhat.com>
+
+       * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
+       (free_stacks): ...here.
+       (__free_stack_cache): New function.
+       * pthreadP.h: Declare __free_stack_cache.
+       * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
+       ptr_freeres.
+       * init.c (pthread_functions): Initialize ptr_freeres.
+       * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
+       New freeres function.
+
 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
 
        [BZ #3018]
index 4a1cd18481c7af0ae0d391f94eb4e8d2509b2cdf..c05cd47dffdb63f38dae29b447118970082cc2de 100644 (file)
@@ -211,6 +211,45 @@ get_cached_stack (size_t *sizep, void **memp)
 }
 
 
+/* Free stacks until cache size is lower than LIMIT.  */
+static void
+free_stacks (size_t limit)
+{
+  /* We reduce the size of the cache.  Remove the last entries until
+     the size is below the limit.  */
+  list_t *entry;
+  list_t *prev;
+
+  /* Search from the end of the list.  */
+  list_for_each_prev_safe (entry, prev, &stack_cache)
+    {
+      struct pthread *curr;
+
+      curr = list_entry (entry, struct pthread, list);
+      if (FREE_P (curr))
+       {
+         /* Unlink the block.  */
+         list_del (entry);
+
+         /* Account for the freed memory.  */
+         stack_cache_actsize -= curr->stackblock_size;
+
+         /* Free the memory associated with the ELF TLS.  */
+         _dl_deallocate_tls (TLS_TPADJ (curr), false);
+
+         /* Remove this block.  This should never fail.  If it does
+            something is really wrong.  */
+         if (munmap (curr->stackblock, curr->stackblock_size) != 0)
+           abort ();
+
+         /* Maybe we have freed enough.  */
+         if (stack_cache_actsize <= limit)
+           break;
+       }
+    }
+}
+
+
 /* Add a stack frame which is not used anymore to the stack.  Must be
    called with the cache lock held.  */
 static inline void
@@ -224,40 +263,15 @@ queue_stack (struct pthread *stack)
 
   stack_cache_actsize += stack->stackblock_size;
   if (__builtin_expect (stack_cache_actsize > stack_cache_maxsize, 0))
-    {
-      /* We reduce the size of the cache.  Remove the last entries
-        until the size is below the limit.  */
-      list_t *entry;
-      list_t *prev;
-
-      /* Search from the end of the list.  */
-      list_for_each_prev_safe (entry, prev, &stack_cache)
-       {
-         struct pthread *curr;
-
-         curr = list_entry (entry, struct pthread, list);
-         if (FREE_P (curr))
-           {
-             /* Unlink the block.  */
-             list_del (entry);
-
-             /* Account for the freed memory.  */
-             stack_cache_actsize -= curr->stackblock_size;
-
-             /* Free the memory associated with the ELF TLS.  */
-             _dl_deallocate_tls (TLS_TPADJ (curr), false);
+    free_stacks (stack_cache_maxsize);
+}
 
-             /* Remove this block.  This should never fail.  If it
-                does something is really wrong.  */
-             if (munmap (curr->stackblock, curr->stackblock_size) != 0)
-               abort ();
 
-             /* Maybe we have freed enough.  */
-             if (stack_cache_actsize <= stack_cache_maxsize)
-               break;
-           }
-       }
-    }
+/* This function is called indirectly from the freeres code in libc.  */
+void
+__free_stack_cache (void)
+{
+  free_stacks (0);
 }
 
 
index 7cfe803c4237b91e8654c416f2ba18951eb80a12..14441153b8e28de944013cdf7103304a7ce28bbf 100644 (file)
@@ -136,7 +136,9 @@ static const struct pthread_functions pthread_functions =
     .ptr_nthreads = &__nptl_nthreads,
     .ptr___pthread_unwind = &__pthread_unwind,
     .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,
-    .ptr__nptl_setxid = __nptl_setxid
+    .ptr__nptl_setxid = __nptl_setxid,
+    /* For now only the stack cache needs to be freed.  */
+    .ptr_freeres = __free_stack_cache
   };
 # define ptr_pthread_functions &pthread_functions
 #else
index 503e99b2b47f8b79a9cb9d7393ad860b4adcede7..f9634ab0ffac97210688164b7e6acab347d66c96 100644 (file)
@@ -543,6 +543,8 @@ extern void __nptl_deallocate_tsd (void) attribute_hidden;
 
 extern int __nptl_setxid (struct xid_command *cmdp) attribute_hidden;
 
+extern void __free_stack_cache (void) attribute_hidden;
+
 #ifdef SHARED
 # define PTHREAD_STATIC_FN_REQUIRE(name)
 #else
index d75bbbb11eb5868c43634885a18942013f1a6200..74d24005c32119217b0d68e2ec4013e0164ff8e5 100644 (file)
@@ -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.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -95,6 +95,7 @@ struct pthread_functions
        __attribute ((noreturn)) __cleanup_fct_attribute;
   void (*ptr__nptl_deallocate_tsd) (void);
   int (*ptr__nptl_setxid) (struct xid_command *);
+  void (*ptr_freeres) (void);
 };
 
 /* Variable in libc.so.  */
index 4e60596f7decaf115b1fe8d096da82325a7b1e59..4e0001af91bc7d629fcaeb2443d2457e93181e57 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -57,3 +57,10 @@ __libc_pthread_init (ptr, reclaim, functions)
   return &__libc_multiple_threads;
 #endif
 }
+
+
+libc_freeres_fn (freeres_libptread)
+{
+  if (__libc_pthread_functions.ptr_freeres != NULL)
+    __libc_pthread_functions.ptr_freeres ();
+}
index 96f26d5482a990f77717903412c177b5e0d8d73c..b08aef2f6cdb0f907df3e428328bd51b33460705 100644 (file)
@@ -198,7 +198,7 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
 }
 
 
-#if defined __USE_REENTRANT || defined __USE_UNIX98
+#if defined __USE_REENTRANT || defined __USE_POSIX199506
 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
      __nonnull ((1));
 extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen),
index c7a52722ca624b2ef2f5ccfd9ee12ddda43f22bf..b751928b1e566311ea9b8af7412527442e8d1a89 100644 (file)
@@ -811,7 +811,7 @@ extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;
    This function is a possible cancellation points and therefore not
    marked with __THROW.  */
 extern char *getlogin (void);
-#if defined __USE_REENTRANT || defined __USE_UNIX98
+#if defined __USE_REENTRANT || defined __USE_POSIX199506
 /* Return at most NAME_LEN characters of the login name of the user in NAME.
    If it cannot be determined or some other error occurred, return the error
    code.  Otherwise return 0.
index ef2b685393d870f22d5c3f749adbcd497cd3d0d1..b7d0f9b7e7d7b2cfd3a276f3c05b9469627f2984 100644 (file)
@@ -59,8 +59,8 @@ __BEGIN_DECLS
 
 /* Result of the lookup functions and how to retrieve the base address.  */
 typedef struct link_map *lookup_t;
-# define LOOKUP_VALUE(map) map
-# define LOOKUP_VALUE_ADDRESS(map) ((map) ? (map)->l_addr : 0)
+#define LOOKUP_VALUE(map) map
+#define LOOKUP_VALUE_ADDRESS(map) ((map) ? (map)->l_addr : 0)
 
 /* On some architectures a pointer to a function is not just a pointer
    to the actual code of the function but rather an architecture
@@ -76,7 +76,7 @@ typedef struct link_map *lookup_t;
 /* On some architectures dladdr can't use st_size of all symbols this way.  */
 #define DL_ADDR_SYM_MATCH(L, SYM, MATCHSYM, ADDR) \
   ((ADDR) >= (L)->l_addr + (SYM)->st_value                             \
-   && (((SYM)->st_size == 0                                            \
+   && ((((SYM)->st_shndx == SHN_UNDEF || (SYM)->st_size == 0)          \
        && (ADDR) == (L)->l_addr + (SYM)->st_value)                     \
        || (ADDR) < (L)->l_addr + (SYM)->st_value + (SYM)->st_size)     \
    && ((MATCHSYM) == NULL || (MATCHSYM)->st_value < (SYM)->st_value))
index 33af208888321782248539a9f2334b4f75d2ba1f..bed27559c5c97030a0e3e79b68ef5f60746b6fea 100644 (file)
@@ -1,5 +1,5 @@
 /* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,2000,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
@@ -65,7 +65,8 @@ __bswap_16 (unsigned short int __bsx)
 /* To swap the bytes in a word the i486 processors and up provide the
    `bswap' opcode.  On i386 we have to use three instructions.  */
 #  if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \
-      && !defined __pentium4__
+      && !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \
+      && !defined __k6__
 #   define __bswap_32(x)                                                     \
      (__extension__                                                          \
       ({ register unsigned int __v, __x = (x);                               \
index 1ead3dd63df04923f07851dc91bbdd36354cb10b..ac4a0d5aa9edc0b164be7c924a03ce75fc45caa5 100644 (file)
@@ -1,5 +1,5 @@
 /* Run-time dynamic linker data structures for loaded ELF shared objects.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
@@ -47,7 +47,7 @@ _dl_ppc64_addr_sym_match (const struct link_map *l, const ElfW(Sym) *sym,
            return false;
        }
     }
-  else if (sym->st_size == 0)
+  else if (sym->st_shndx == SHN_UNDEF || sym->st_size == 0)
     {
       if (addr != value)
        return false;