summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-08-05 21:03:00 +0000
committerMike Frysinger <vapier@gentoo.org>2004-08-05 21:03:00 +0000
commit30d008977901e3adba3d5f45d9e93b1a6d1d4c10 (patch)
tree53221ee68764b90cea3120707a063285fd2dc638 /sys-libs
parentun-deprecating until i can fix a small bug in the cascading profile... (diff)
downloadgentoo-2-30d008977901e3adba3d5f45d9e93b1a6d1d4c10.tar.gz
gentoo-2-30d008977901e3adba3d5f45d9e93b1a6d1d4c10.tar.bz2
gentoo-2-30d008977901e3adba3d5f45d9e93b1a6d1d4c10.zip
remove more fatty patches
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v2.patch34
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat.patch16
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-ftw.patch187
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-getgrouplist.patch68
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-locale.patch323
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-prelinkfix.patch176
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-sscanf.patch13
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-tst-rndseek-mips.patch16
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-typeo_dl-runtime_c.patch20
9 files changed, 0 insertions, 853 deletions
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v2.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v2.patch
deleted file mode 100644
index 8afc061a87ea..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v2.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- glibc-2.3.1/ctype/ctype-info.c.orig 2002-11-07 15:58:39.000000000 +0200
-+++ glibc-2.3.1/ctype/ctype-info.c 2002-11-07 16:01:24.000000000 +0200
-@@ -48,6 +48,7 @@
-
- #define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
-
-+#if 0
- const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
- const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
- const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
-@@ -61,5 +62,23 @@
- compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
- compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
- compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
-+#endif
-
- #endif
-+
-+/* Temporarily exported until all .a libraries are recompiled. */
-+#undef b
-+#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
-+
-+extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
-+
-+const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
-+const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
-+const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
-+const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
-+const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
-+const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
-+
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat.patch
deleted file mode 100644
index 8e07aa068291..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- glibc-2.3.1/ctype/ctype-info.c.orig 2002-10-26 02:12:56.000000000 +0200
-+++ glibc-2.3.1/ctype/ctype-info.c 2002-10-26 02:14:53.000000000 +0200
-@@ -55,11 +55,13 @@
- const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
- const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
-
-+#if 0
- compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
- compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
- compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
- compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
- compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
- compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
-+#endif
-
- #endif
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ftw.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ftw.patch
deleted file mode 100644
index 03377461b5c5..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ftw.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-2003-11-04 Jakub Jelinek <jakub@redhat.com>
-
- * io/ftw.c (ftw_dir): Close dir if callback with FTW_D type returns
- non-zero.
- * io/Makefile (tests): Add bug-ftw4.
- * io/bug-ftw4.c: New test.
-
---- libc/io/Makefile.jj 2003-10-29 00:18:42.000000000 +0100
-+++ libc/io/Makefile 2003-11-04 19:40:10.000000000 +0100
-@@ -57,7 +57,7 @@ static-only-routines = stat fstat lstat
- others := pwd
- test-srcs := ftwtest
- tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
-- tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3
-+ tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4
-
- distribute := ftwtest-sh
-
---- libc/io/ftw.c.jj 2003-06-11 23:48:58.000000000 +0200
-+++ libc/io/ftw.c 2003-11-04 19:57:42.000000000 +0100
-@@ -474,7 +474,19 @@ ftw_dir (struct ftw_data *data, struct S
- {
- result = (*data->func) (data->dirbuf, st, FTW_D, &data->ftw);
- if (result != 0)
-- return result;
-+ {
-+ int save_err;
-+fail:
-+ save_err = errno;
-+ __closedir (dir.stream);
-+ __set_errno (save_err);
-+
-+ if (data->actdir-- == 0)
-+ data->actdir = data->maxdir - 1;
-+ data->dirstreams[data->actdir] = NULL;
-+
-+ return result;
-+ }
- }
-
- /* If necessary, change to this directory. */
-@@ -492,17 +504,7 @@ ftw_dir (struct ftw_data *data, struct S
- }
-
- if (result != 0)
-- {
-- int save_err = errno;
-- __closedir (dir.stream);
-- __set_errno (save_err);
--
-- if (data->actdir-- == 0)
-- data->actdir = data->maxdir - 1;
-- data->dirstreams[data->actdir] = NULL;
--
-- return result;
-- }
-+ goto fail;
- }
-
- /* Next, update the `struct FTW' information. */
---- libc/io/bug-ftw4.c.jj 2003-11-04 19:39:53.000000000 +0100
-+++ libc/io/bug-ftw4.c 2003-11-04 19:43:57.000000000 +0100
-@@ -0,0 +1,124 @@
-+/* Test if ftw function doesn't leak fds.
-+ Copyright (C) 2003 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-+
-+ 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 <fcntl.h>
-+#include <ftw.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+
-+static int cb_called;
-+
-+static int
-+cb (const char *name, const struct stat64 *st, int type)
-+{
-+ return cb_called++ & 1;
-+}
-+
-+int
-+main (void)
-+{
-+ char name[32] = "/tmp/ftwXXXXXX", *p;
-+ int ret, i, result = 0, fd, fd1, fd2;
-+
-+ if (mkdtemp (name) == NULL)
-+ {
-+ printf ("Couldn't make temporary directory: %m\n");
-+ exit (EXIT_FAILURE);
-+ }
-+ p = strchr (name, '\0');
-+ strcpy (p, "/1");
-+ if (mkdir (name, 0755) < 0)
-+ {
-+ printf ("Couldn't make temporary subdirectory: %m\n");
-+ exit (EXIT_FAILURE);
-+ }
-+ *p = '\0';
-+
-+ ret = ftw64 (name, cb, 20);
-+ if (ret != 1)
-+ {
-+ printf ("ftw64 returned %d instead of 1", ret);
-+ result = 1;
-+ }
-+
-+ fd = open (name, O_RDONLY);
-+ if (fd < 0)
-+ {
-+ printf ("open failed: %m\n");
-+ result = 1;
-+ }
-+ fd1 = open (name, O_RDONLY);
-+ if (fd1 < 0)
-+ {
-+ printf ("open failed: %m\n");
-+ result = 1;
-+ }
-+ else
-+ close (fd1);
-+ if (fd >= 0)
-+ close (fd);
-+
-+ for (i = 0; i < 128; ++i)
-+ {
-+ ret = ftw64 (name, cb, 20);
-+ if (ret != 1)
-+ {
-+ printf ("ftw64 returned %d instead of 1", ret);
-+ result = 1;
-+ }
-+ }
-+
-+ fd = open (name, O_RDONLY);
-+ if (fd < 0)
-+ {
-+ printf ("open failed: %m\n");
-+ result = 1;
-+ }
-+ fd2 = open (name, O_RDONLY);
-+ if (fd2 < 0)
-+ {
-+ printf ("open failed: %m\n");
-+ result = 1;
-+ }
-+ else
-+ close (fd2);
-+ if (fd >= 0)
-+ close (fd);
-+
-+ if (fd2 >= fd1 + 128)
-+ {
-+ printf ("ftw64 leaking fds: %d -> %d\n", fd1, fd2);
-+ result = 1;
-+ }
-+
-+ if (cb_called != 129 * 2)
-+ {
-+ printf ("callback called %d times\n", cb_called);
-+ result = 1;
-+ }
-+
-+ strcpy (p, "/1");
-+ rmdir (name);
-+ *p = '\0';
-+ rmdir (name);
-+ return result;
-+}
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-getgrouplist.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-getgrouplist.patch
deleted file mode 100644
index 8dba0fbbd829..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-getgrouplist.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-2003-04-23 Ulrich Drepper <drepper@redhat.com>
-
- * grp/initgroups.c (getgrouplist): Don't copy too much into the
- user buffer if more groups are found than fit into it.
-
---- libc/grp/initgroups.c 13 Mar 2002 17:51:09 -0000 1.28
-+++ libc/grp/initgroups.c 23 Apr 2003 21:26:34 -0000 1.29
-@@ -23,6 +23,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <nsswitch.h>
-
-@@ -207,6 +208,9 @@ getgrouplist (const char *user, gid_t gr
- return -1;
-
- result = internal_getgrouplist (user, group, &size, &newgroups, -1);
-+
-+ memcpy (groups, newgroups, MIN (*ngroups, result) * sizeof (gid_t));
-+
- if (result > *ngroups)
- {
- *ngroups = result;
-@@ -215,8 +219,6 @@ getgrouplist (const char *user, gid_t gr
- else
- *ngroups = result;
-
-- memcpy (groups, newgroups, *ngroups * sizeof (gid_t));
--
- free (newgroups);
- return result;
- }
-
-============
-testcase:
-
-#include <grp.h>
-#include <stdlib.h>
-
-int main (void)
-{
- int ngroups = 2, old_ngroups;
- gid_t *groups = (gid_t *) malloc ((ngroups + 1) * sizeof (gid_t));
-
- if (groups == NULL)
- abort ();
- groups[ngroups] = (gid_t) 0xdeadbeef;
- old_ngroups = ngroups;
- if (getgrouplist ("bin", 0, groups, &ngroups) < 0)
- {
- if (groups[old_ngroups] != (gid_t) 0xdeadbeef)
- abort ();
- groups = realloc (groups, (ngroups + 1) * sizeof (gid_t));
- if (groups == NULL)
- abort ();
- groups[ngroups] = (gid_t) 0xdeadbeef;
- old_ngroups = ngroups;
- if (getgrouplist ("bin", 0, groups, &ngroups) < 0)
- abort ();
- if (groups[old_ngroups] != (gid_t) 0xdeadbeef)
- abort ();
- }
- else
- abort ();
- exit (0);
-}
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-locale.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-locale.patch
deleted file mode 100644
index 545ba7fbb83f..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-locale.patch
+++ /dev/null
@@ -1,323 +0,0 @@
---- glibc-2.3.1/locale/programs/locale.c.jj 2003-01-11 18:13:57.000000000 +0000
-+++ glibc-2.3.1/locale/programs/locale.c 2003-01-11 18:13:59.000000000 +0000
-@@ -43,10 +43,12 @@
-
- #include "localeinfo.h"
- #include "charmap-dir.h"
-+#include "../locarchive.h"
-
- extern void *xmalloc (size_t __n);
- extern char *xstrdup (const char *__str);
-
-+#define ARCHIVE_NAME LOCALEDIR "/locale-archive"
-
- /* If set print the name of the category. */
- static int show_category_name;
-@@ -168,7 +170,11 @@
- int show_keyword_name);
-
- /* Prototypes for local functions. */
-+static void print_LC_IDENTIFICATION (void *mapped, size_t size);
-+static void print_LC_CTYPE (void *mapped, size_t size);
- static void write_locales (void);
-+static int nameentcmp (const void *a, const void *b);
-+static int write_archive_locales (void **all_datap, char *linebuf);
- static void write_charmaps (void);
- static void show_locale_vars (void);
- static void show_info (const char *name);
-@@ -327,6 +333,74 @@
- }
-
-
-+static void
-+print_LC_IDENTIFICATION (void *mapped, size_t size)
-+{
-+ /* Read the information from the file. */
-+ struct
-+ {
-+ unsigned int magic;
-+ unsigned int nstrings;
-+ unsigned int strindex[0];
-+ } *filedata = mapped;
-+
-+ if (filedata->magic == LIMAGIC (LC_IDENTIFICATION)
-+ && (sizeof *filedata
-+ + (filedata->nstrings
-+ * sizeof (unsigned int))
-+ <= size))
-+ {
-+ const char *str;
-+
-+#define HANDLE(idx, name) \
-+ str = ((char *) mapped \
-+ + filedata->strindex[_NL_ITEM_INDEX (_NL_IDENTIFICATION_##idx)]); \
-+ if (*str != '\0') \
-+ printf ("%9s | %s\n", name, str)
-+ HANDLE (TITLE, "title");
-+ HANDLE (SOURCE, "source");
-+ HANDLE (ADDRESS, "address");
-+ HANDLE (CONTACT, "contact");
-+ HANDLE (EMAIL, "email");
-+ HANDLE (TEL, "telephone");
-+ HANDLE (FAX, "fax");
-+ HANDLE (LANGUAGE, "language");
-+ HANDLE (TERRITORY, "territory");
-+ HANDLE (AUDIENCE, "audience");
-+ HANDLE (APPLICATION, "application");
-+ HANDLE (ABBREVIATION, "abbreviation");
-+ HANDLE (REVISION, "revision");
-+ HANDLE (DATE, "date");
-+ }
-+}
-+
-+
-+static void
-+print_LC_CTYPE (void *mapped, size_t size)
-+{
-+ struct
-+ {
-+ unsigned int magic;
-+ unsigned int nstrings;
-+ unsigned int strindex[0];
-+ } *filedata = mapped;
-+
-+ if (filedata->magic == LIMAGIC (LC_CTYPE)
-+ && (sizeof *filedata
-+ + (filedata->nstrings
-+ * sizeof (unsigned int))
-+ <= size))
-+ {
-+ const char *str;
-+
-+ str = ((char *) mapped
-+ + filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]);
-+ if (*str != '\0')
-+ printf (" codeset | %s\n", str);
-+ }
-+}
-+
-+
- /* Write the names of all available locales to stdout. We have some
- sources of the information: the contents of the locale directory
- and the locale.alias file. To avoid duplicates and print the
-@@ -358,6 +432,10 @@
- memset (linebuf, '-', sizeof (linebuf) - 1);
- linebuf[sizeof (linebuf) - 1] = '\0';
-
-+ /* First scan the locale archive. */
-+ if (write_archive_locales (&all_data, linebuf))
-+ first_locale = 0;
-+
- /* Now we can look for all files in the directory. */
- ndirents = scandir (LOCALEDIR, &dirents, select_dirs, alphasort);
- for (cnt = 0; cnt < ndirents; ++cnt)
-@@ -375,7 +453,7 @@
-
- if (stat64 (buf, &st) == 0 && S_ISREG (st.st_mode))
- {
-- if (verbose)
-+ if (verbose && GET (dirents[cnt]->d_name) == NULL)
- {
- /* Provide some nice output of all kinds of
- information. */
-@@ -396,42 +474,7 @@
- MAP_SHARED, fd, 0);
- if (mapped != MAP_FAILED)
- {
-- /* Read the information from the file. */
-- struct
-- {
-- unsigned int magic;
-- unsigned int nstrings;
-- unsigned int strindex[0];
-- } *filedata = mapped;
--
-- if (filedata->magic == LIMAGIC (LC_IDENTIFICATION)
-- && (sizeof *filedata
-- + (filedata->nstrings
-- * sizeof (unsigned int))
-- <= (size_t) st.st_size))
-- {
-- const char *str;
--
--#define HANDLE(idx, name) \
-- str = ((char *) mapped \
-- + filedata->strindex[_NL_ITEM_INDEX (_NL_IDENTIFICATION_##idx)]); \
-- if (*str != '\0') \
-- printf ("%9s | %s\n", name, str)
-- HANDLE (TITLE, "title");
-- HANDLE (SOURCE, "source");
-- HANDLE (ADDRESS, "address");
-- HANDLE (CONTACT, "contact");
-- HANDLE (EMAIL, "email");
-- HANDLE (TEL, "telephone");
-- HANDLE (FAX, "fax");
-- HANDLE (LANGUAGE, "language");
-- HANDLE (TERRITORY, "territory");
-- HANDLE (AUDIENCE, "audience");
-- HANDLE (APPLICATION, "application");
-- HANDLE (ABBREVIATION, "abbreviation");
-- HANDLE (REVISION, "revision");
-- HANDLE (DATE, "date");
-- }
-+ print_LC_IDENTIFICATION (mapped, st.st_size);
-
- munmap (mapped, st.st_size);
- }
-@@ -446,26 +489,7 @@
- MAP_SHARED, fd, 0))
- != MAP_FAILED))
- {
-- struct
-- {
-- unsigned int magic;
-- unsigned int nstrings;
-- unsigned int strindex[0];
-- } *filedata = mapped;
--
-- if (filedata->magic == LIMAGIC (LC_CTYPE)
-- && (sizeof *filedata
-- + (filedata->nstrings
-- * sizeof (unsigned int))
-- <= (size_t) st.st_size))
-- {
-- const char *str;
--
-- str = ((char *) mapped
-- + filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]);
-- if (*str != '\0')
-- printf (" codeset | %s\n", str);
-- }
-+ print_LC_CTYPE (mapped, st.st_size);
-
- munmap (mapped, st.st_size);
- }
-@@ -474,10 +498,10 @@
- close (fd);
- }
- }
-- else
-- /* If the verbose format is not selected we simply
-- collect the names. */
-- PUT (xstrdup (dirents[cnt]->d_name));
-+
-+ /* If the verbose format is not selected we simply
-+ collect the names. */
-+ PUT (xstrdup (dirents[cnt]->d_name));
- }
- }
- if (ndirents > 0)
-@@ -584,6 +608,113 @@
- }
-
-
-+struct nameent
-+{
-+ char *name;
-+ uint32_t locrec_offset;
-+};
-+
-+
-+static int
-+nameentcmp (const void *a, const void *b)
-+{
-+ return strcoll (((const struct nameent *) a)->name,
-+ ((const struct nameent *) b)->name);
-+}
-+
-+
-+static int
-+write_archive_locales (void **all_datap, char *linebuf)
-+{
-+ struct stat64 st;
-+ void *all_data = *all_datap;
-+ size_t len = 0;
-+ struct locarhead *head;
-+ struct namehashent *namehashtab;
-+ char *addr = MAP_FAILED;
-+ int fd, ret = 0;
-+ uint32_t cnt;
-+
-+ fd = open64 (ARCHIVE_NAME, O_RDONLY);
-+ if (fd < 0)
-+ return 0;
-+
-+ if (fstat64 (fd, &st) < 0 || st.st_size < sizeof (*head))
-+ goto error_out;
-+
-+ len = st.st_size;
-+ addr = mmap64 (NULL, len, PROT_READ, MAP_SHARED, fd, 0);
-+ if (addr == MAP_FAILED)
-+ goto error_out;
-+
-+ head = (struct locarhead *) addr;
-+ if (head->namehash_offset + head->namehash_size > len
-+ || head->string_offset + head->string_size > len
-+ || head->locrectab_offset + head->locrectab_size > len
-+ || head->sumhash_offset + head->sumhash_size > len)
-+ goto error_out;
-+
-+ namehashtab = (struct namehashent *) (addr + head->namehash_offset);
-+ if (! verbose)
-+ {
-+ for (cnt = 0; cnt < head->namehash_size; ++cnt)
-+ if (namehashtab[cnt].locrec_offset != 0)
-+ {
-+ PUT (xstrdup (addr + namehashtab[cnt].name_offset));
-+ ++ret;
-+ }
-+ }
-+ else
-+ {
-+ struct nameent *names;
-+ uint32_t used;
-+
-+ names = (struct nameent *) xmalloc (head->namehash_used
-+ * sizeof (struct nameent));
-+ for (cnt = used = 0; cnt < head->namehash_size; ++cnt)
-+ if (namehashtab[cnt].locrec_offset != 0)
-+ {
-+ names[used].name = addr + namehashtab[cnt].name_offset;
-+ names[used++].locrec_offset = namehashtab[cnt].locrec_offset;
-+ }
-+
-+ /* Sort the names. */
-+ qsort (names, used, sizeof (struct nameent), nameentcmp);
-+
-+ for (cnt = 0; cnt < used; ++cnt)
-+ {
-+ struct locrecent *locrec;
-+
-+ PUT (xstrdup (names[cnt].name));
-+
-+ if (cnt)
-+ putchar_unlocked ('\n');
-+
-+ printf ("locale: %-15.15s archive: " ARCHIVE_NAME "\n%s\n",
-+ names[cnt].name, linebuf);
-+
-+ locrec = (struct locrecent *) (addr + names[cnt].locrec_offset);
-+
-+ print_LC_IDENTIFICATION (addr
-+ + locrec->record[LC_IDENTIFICATION].offset,
-+ locrec->record[LC_IDENTIFICATION].len);
-+
-+ print_LC_CTYPE (addr + locrec->record[LC_CTYPE].offset,
-+ locrec->record[LC_CTYPE].len);
-+ }
-+
-+ ret = used;
-+ }
-+
-+error_out:
-+ if (addr != MAP_FAILED)
-+ munmap (addr, len);
-+ close (fd);
-+ *all_datap = all_data;
-+ return ret;
-+}
-+
-+
- /* Write the names of all available character maps to stdout. */
- static void
- write_charmaps (void)
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-prelinkfix.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-prelinkfix.patch
deleted file mode 100644
index db829b16730e..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-prelinkfix.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- glibc-2.3.1/sysdeps/i386/dl-machine.h 2002-09-18 02:28:40.000000000 +0100
-+++ libc/sysdeps/i386/dl-machine.h 2002-11-15 22:51:19.000000000 +0000
-@@ -201,7 +201,7 @@
- .previous\n\
- ");
- # else
--# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
-+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .globl _dl_runtime_profile\n\
-@@ -299,7 +299,7 @@
- define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- of the main executable's symbols, as for a COPY reloc. */
--#ifdef USE_TLS
-+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
- # define elf_machine_type_class(type) \
- ((((type) == R_386_JMP_SLOT || (type) == R_386_TLS_DTPMOD32 \
- || (type) == R_386_TLS_DTPOFF32 || (type) == R_386_TLS_TPOFF32 \
-@@ -389,7 +389,7 @@
- return;
- # endif
- else
--#endif
-+#endif /* !RTLD_BOOTSTRAP and have no -z combreloc */
- {
- const Elf32_Sym *const refsym = sym;
- #if defined USE_TLS && !defined RTLD_BOOTSTRAP
-@@ -402,7 +402,7 @@
- if (sym != NULL)
- # endif
- value += sym->st_value;
--#endif
-+#endif /* use TLS and !RTLD_BOOTSTRAP */
-
- switch (r_type)
- {
-@@ -411,7 +411,7 @@
- *reloc_addr = value;
- break;
-
--#ifdef USE_TLS
-+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
- case R_386_TLS_DTPMOD32:
- # ifdef RTLD_BOOTSTRAP
- /* During startup the dynamic linker is always the module
-@@ -444,7 +444,10 @@
- thread pointer. To get the variable position in the TLS
- block we subtract the offset from that of the TLS block. */
- if (sym != NULL)
-- *reloc_addr += sym_map->l_tls_offset - sym->st_value;
-+ {
-+ *reloc_addr += sym_map->l_tls_offset - sym->st_value;
-+ CHECK_STATIC_TLS (map, sym_map);
-+ }
- # endif
- break;
- case R_386_TLS_TPOFF:
-@@ -456,7 +459,10 @@
- It is a negative value which will be added to the
- thread pointer. */
- if (sym != NULL)
-- *reloc_addr += sym->st_value - sym_map->l_tls_offset;
-+ {
-+ *reloc_addr += sym->st_value - sym_map->l_tls_offset;
-+ CHECK_STATIC_TLS (map, sym_map);
-+ }
- # endif
- break;
- #endif /* use TLS */
-@@ -491,7 +497,7 @@
- default:
- _dl_reloc_bad_type (map, r_type, 0);
- break;
--#endif
-+#endif /* !RTLD_BOOTSTRAP */
- }
- }
- }
-@@ -508,6 +514,9 @@
- *reloc_addr = map->l_addr + reloc->r_addend;
- else if (r_type != R_386_NONE)
- {
-+# ifndef RESOLVE_CONFLICT_FIND_MAP
-+ const Elf32_Sym *const refsym = sym;
-+# endif
- # ifdef USE_TLS
- struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
- Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
-@@ -515,7 +524,7 @@
- Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
- if (sym != NULL)
- value += sym->st_value;
--#endif
-+# endif
-
- switch (ELF32_R_TYPE (reloc->r_info))
- {
-@@ -528,7 +537,7 @@
- *reloc_addr = (value + reloc->r_addend - (Elf32_Addr) reloc_addr);
- break;
-
--#ifdef USE_TLS
-+# ifdef USE_TLS
- case R_386_TLS_DTPMOD32:
- /* Get the information from the link map returned by the
- resolv function. */
-@@ -549,6 +558,7 @@
- *reloc_addr
- = (sym == NULL ? 0 : sym_map->l_tls_offset - sym->st_value)
- + reloc->r_addend;
-+ CHECK_STATIC_TLS (map, sym_map);
- break;
- case R_386_TLS_TPOFF:
- /* The offset is negative, forward from the thread pointer. */
-@@ -558,8 +568,32 @@
- *reloc_addr
- = (sym == NULL ? 0 : sym->st_value - sym_map->l_tls_offset)
- + reloc->r_addend;
-+ CHECK_STATIC_TLS (map, sym_map);
- break;
--#endif /* use TLS */
-+# endif /* use TLS */
-+# ifndef RESOLVE_CONFLICT_FIND_MAP
-+ /* Not needed for dl-conflict.c. */
-+ case R_386_COPY:
-+ if (sym == NULL)
-+ /* This can happen in trace mode if an object could not be
-+ found. */
-+ break;
-+ if (__builtin_expect (sym->st_size > refsym->st_size, 0)
-+ || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-+ && GL(dl_verbose)))
-+ {
-+ const char *strtab;
-+
-+ strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
-+ _dl_error_printf ("\
-+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
-+ rtld_progname ?: "<program name unknown>",
-+ strtab + refsym->st_name);
-+ }
-+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
-+ refsym->st_size));
-+ break;
-+# endif /* !RESOLVE_CONFLICT_FIND_MAP */
- default:
- /* We add these checks in the version to relocate ld.so only
- if we are still debugging. */
-@@ -568,7 +602,7 @@
- }
- }
- }
--#endif
-+#endif /* !RTLD_BOOTSTRAP */
-
- static inline void
- elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
-@@ -585,7 +619,7 @@
- {
- *reloc_addr = l_addr + reloc->r_addend;
- }
--#endif
-+#endif /* !RTLD_BOOTSTRAP */
-
- static inline void
- elf_machine_lazy_rel (struct link_map *map,
-@@ -614,6 +648,6 @@
- {
- }
-
--#endif
-+#endif /* !RTLD_BOOTSTRAP */
-
- #endif /* RESOLVE */
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-sscanf.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-sscanf.patch
deleted file mode 100644
index 6673117c20df..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-sscanf.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- stdio-common/sscanf.c.orig 2003-11-09 22:40:01.119617688 -0500
-+++ stdio-common/sscanf.c 2003-11-09 22:40:12.144941584 -0500
-@@ -27,9 +27,7 @@
- /* Read formatted input from S, according to the format string FORMAT. */
- /* VARARGS2 */
- int
--sscanf (s, format)
-- const char *s;
-- const char *format;
-+sscanf (const char *s, const char *format, ...)
- {
- va_list arg;
- int done;
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-tst-rndseek-mips.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-tst-rndseek-mips.patch
deleted file mode 100644
index 57d49cf49550..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-tst-rndseek-mips.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-# DP: Description: we need a longer timeout for slow machines
-# DP: Author: Guido Guenther <agx@sigxcpu.org>
-# DP: Upstream status: In CVS
-# DP: Date: 2002-10-16
-
---- libc/stdio-common/tst-rndseek.c.orig Wed Oct 16 17:02:06 2002
-+++ libc/stdio-common/tst-rndseek.c Wed Oct 16 17:02:16 2002
-@@ -10,7 +10,7 @@
-
- static int do_test (void);
- #define TEST_FUNCTION do_test ()
--#define TIMEOUT 4
-+#define TIMEOUT 10
-
- #include "../test-skeleton.c"
-
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-typeo_dl-runtime_c.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-typeo_dl-runtime_c.patch
deleted file mode 100644
index 2cd7743a0003..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-typeo_dl-runtime_c.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- glibc-2.3.1/elf/dl-runtime.c.orig 2003-03-09 05:26:32.000000000 +0200
-+++ glibc-2.3.1/elf/dl-runtime.c 2003-03-09 05:26:59.000000000 +0200
-@@ -84,7 +84,7 @@
- {
- const ElfW(Half) *vernum =
- (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]);
-- ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
-+ ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
- const struct r_found_version *version = &l->l_versions[ndx];
-
- if (version->hash != 0)
-@@ -179,7 +179,7 @@
- {
- const ElfW(Half) *vernum =
- (const void *) D_PTR (l,l_info[VERSYMIDX (DT_VERSYM)]);
-- ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
-+ ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
- const struct r_found_version *version = &l->l_versions[ndx];
-
- if (version->hash != 0)