update to 2.16 with latest fedora and mandriva patches

This commit is contained in:
Dmitry Mikhirev 2012-07-10 14:20:40 +04:00
parent b9b04af528
commit a0b9d45b7c
82 changed files with 7162 additions and 3418 deletions

View file

@ -1,8 +1,7 @@
---
sources:
crypt_blowfish-1.0.2.tar.gz: e83e798528e72695e610e2a6419b57272d00fa0b
glibc-2.13.tar.xz: 38e7d510b41a2c36eb392c79eb5c80e0ec35a7f2
glibc-2.13.tar.xz.sig: c7953c5c032a3394af6711c21ee8972500f5667d
crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9
glibc-2.16.0-fedora.tar.gz: 855662db6faaaa3d6c9a46346d8b6d20942f5b10
glibc-2.16.0.tar.xz: 9d4fffc9c4ac93e7919e124fa38bb51dcaff5216
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
glibc-powerpc-cpu-addon-v0.03.tar.bz2: a88f5e1e7647f131984cb831d54ea885b820001e
glibc-redhat.tar.bz2: 4ac897d3bb2367d00bfed2c45a00e4a8a532e9fc
glibc-ports-2.16.0.tar.xz: 429b979b697a97befb56cce49b96ee47d708f20a

View file

@ -0,0 +1,10 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: http://www.openwall.com/signatures/
iQCVAwUATiLawHK5fbEpUCnxAQIT4wP9GTUroM4r21oggeW0k3j5vICwSVHV5BbJ
MBOfliwa1tW9JNh/dEA9GHiPeVWXr/KNWm9/3bSYGDqfsYMlQ7x8w/CCUrS/gvpv
XtvwxUE5juAH5wy4+6oV1gBWiISWGOUcCqkgxPVZKOjlSV4c7kvr10JwqYdnqjK9
RT/A2FgAxM4=
=K4Xs
-----END PGP SIGNATURE-----

View file

@ -1,15 +0,0 @@
2006-05-16 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* scripts/check-local-headers.sh: Filter out multiarch headers.
diff -p -up glibc-2.10.1/scripts/check-local-headers.sh.orig glibc-2.10.1/scripts/check-local-headers.sh
--- glibc-2.10.1/scripts/check-local-headers.sh.orig 2009-04-02 13:59:53.000000000 -0300
+++ glibc-2.10.1/scripts/check-local-headers.sh 2009-05-26 23:45:32.000000000 -0300
@@ -30,6 +30,7 @@ if fgrep "$includedir" */*.{o,os,oS}.d |
fgrep -v "$includedir/asm" |
fgrep -v "$includedir/linux" |
fgrep -v "$includedir/selinux" |
+fgrep -v "$includedir/multiarch-" |
fgrep -v "$includedir/sys/capability.h" |
fgrep -v "$includedir/gd" |
fgrep -v "$includedir/nss3"; then

View file

@ -1,44 +0,0 @@
See https://qa.mandriva.com/show_bug.cgi?id=58834
Patch from bug report, updated for glibc 2.12.1 in Mandriva
diff -p -up glibc-2.12.1/posix/gai.conf.orig glibc-2.12.1/posix/gai.conf
--- glibc-2.12.1/posix/gai.conf.orig 2010-07-27 08:34:39.000000000 -0300
+++ glibc-2.12.1/posix/gai.conf 2010-08-25 11:27:32.302898528 -0300
@@ -56,9 +56,7 @@
#
# scopev4 <mask> <value>
# Add another rule to the RFC 3484 scope table for IPv4 addresses.
-# By default the scope IDs described in section 3.2 in RFC 3484 are
-# used. Changing these defaults should hardly ever be necessary.
-# The defaults are equivalent to:
+# The definitions in RFC 3484 are equivalent to:
#
#scopev4 ::ffff:169.254.0.0/112 2
#scopev4 ::ffff:127.0.0.0/104 2
@@ -69,8 +67,8 @@
#
# For sites which use site-local IPv4 addresses behind NAT there is
# the problem that even if IPv4 addresses are preferred they do not
-# have the same scope and are therefore not sorted first. To change
-# this use only these rules:
+# have the same scope and are therefore not sorted first. Therefore,
+# the following settings are used by default on this system:
#
#scopev4 ::ffff:169.254.0.0/112 2
#scopev4 ::ffff:127.0.0.0/104 2
diff -p -up glibc-2.12.1/sysdeps/posix/getaddrinfo.c.orig glibc-2.12.1/sysdeps/posix/getaddrinfo.c
--- glibc-2.12.1/sysdeps/posix/getaddrinfo.c.orig 2010-07-27 08:34:39.000000000 -0300
+++ glibc-2.12.1/sysdeps/posix/getaddrinfo.c 2010-08-25 11:24:03.960253468 -0300
@@ -1099,10 +1099,12 @@ static const struct scopeentry
/* Link-local addresses: scope 2. */
{ { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
{ { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
+#if 0
/* Site-local addresses: scope 5. */
{ { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
{ { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
{ { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
+#endif
/* Default: scope 14. */
{ { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
};

View file

@ -1,38 +0,0 @@
diff -p -up glibc-2.12.1/sysdeps/generic/paths.h.orig glibc-2.12.1/sysdeps/generic/paths.h
--- glibc-2.12.1/sysdeps/generic/paths.h.orig 2010-07-27 08:34:39.000000000 -0300
+++ glibc-2.12.1/sysdeps/generic/paths.h 2010-12-27 11:19:18.515673954 -0200
@@ -62,13 +62,13 @@
#define _PATH_UNIX "/vmunix"
#define _PATH_UTMP "/var/run/utmp"
#define _PATH_UTMP_DB "/var/run/utmp.db"
-#define _PATH_VI "/usr/bin/vi"
+#define _PATH_VI "/bin/vi"
#define _PATH_WTMP "/var/log/wtmp"
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/misc/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
diff -p -up glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h.orig glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h
--- glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h.orig 2010-07-27 08:34:39.000000000 -0300
+++ glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h 2010-12-27 11:20:43.701245004 -0200
@@ -62,13 +62,13 @@
#define _PATH_TTY "/dev/tty"
#define _PATH_UNIX "/boot/vmlinux"
#define _PATH_UTMP "/var/run/utmp"
-#define _PATH_VI "/usr/bin/vi"
+#define _PATH_VI "/bin/vi"
#define _PATH_WTMP "/var/log/wtmp"
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/misc/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"

View file

@ -1,92 +0,0 @@
From: Andreas Schwab <schwab at redhat dot com>
Subject: [PATCH] Never expand $ORIGIN in privileged programs
Date: Mon, 18 Oct 2010 15:12:09 +0200
Path elements containing $ORIGIN should always be ignored in privileged
programs.
Andreas.
2010-10-18 Andreas Schwab <schwab@redhat.com>
* elf/dl-load.c (is_dst): Remove last parameter.
(_dl_dst_count): Ignore $ORIGIN in privileged programs.
(_dl_dst_substitute): Likewise.
---
elf/dl-load.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index a7162eb..776f7e4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -169,8 +169,7 @@ local_strdup (const char *s)
static size_t
-is_dst (const char *start, const char *name, const char *str,
- int is_path, int secure)
+is_dst (const char *start, const char *name, const char *str, int is_path)
{
size_t len;
bool is_curly = false;
@@ -199,11 +198,6 @@ is_dst (const char *start, const char *name, const char *str,
&& (!is_path || name[len] != ':'))
return 0;
- if (__builtin_expect (secure, 0)
- && ((name[len] != '\0' && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
return len;
}
@@ -218,13 +212,12 @@ _dl_dst_count (const char *name, int is_path)
{
size_t len;
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path. */
+ /* $ORIGIN is not expanded for SUID/GUID programs. */
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if (((len = is_dst (start, name, "ORIGIN", is_path)) != 0
+ && !INTUSE(__libc_enable_secure))
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
++cnt;
name = strchr (name + len, '$');
@@ -256,9 +249,12 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
size_t len;
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{
+ /* Ignore this path element in SUID/SGID programs. */
+ if (INTUSE(__libc_enable_secure))
+ repl = (const char *) -1;
+ else
#ifndef SHARED
if (l == NULL)
repl = _dl_get_origin ();
@@ -266,9 +262,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
#endif
repl = l->l_origin;
}
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
repl = GLRO(dl_platform);
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
repl = DL_DST_LIB;
if (repl != NULL && repl != (const char *) -1)
--
1.7.2.3

View file

@ -1,35 +0,0 @@
2010-06-13 Aurelien Jarno <aurelien@aurel32.net>
* locale/C-translit.h.in: Add entry for U20A1.
diff --git a/locale/C-translit.h.in b/locale/C-translit.h.in
index ab0b130..5286802 100644
--- a/locale/C-translit.h.in
+++ b/locale/C-translit.h.in
@@ -103,6 +103,7 @@
"\x2061" "" /* <U2061> FUNCTION APPLICATION */
"\x2062" "" /* <U2062> INVISIBLE TIMES */
"\x2063" "" /* <U2063> INVISIBLE SEPARATOR */
+"\x20a1" "CRC" /* <U20A1> COLON SIGN */
"\x20a8" "Rs" /* <U20A8> RUPEE SIGN */
"\x20ac" "EUR" /* <U20AC> EURO SIGN */
"\x2100" "a/c" /* <U2100> ACCOUNT OF */
2010-06-13 Aurelien Jarno <aurelien@aurel32.net>
* locales/translit_neutral: Add entry for U20A1.
diff --git a/localedata/locales/translit_neutral b/localedata/locales/translit_neutral
index 5883d28..5712361 100644
--- a/localedata/locales/translit_neutral
+++ b/localedata/locales/translit_neutral
@@ -128,6 +128,8 @@ include "translit_wide";""
<U2063> ""
% DONG SIGN
<U20AB> "<U0110><U1ED3><U006E><U0067>"
+% COLON SIGN
+<U20A1> "<U0043><U0052><U0043>"
% EURO SIGN
<U20AC> "<U0045><U0055><U0052>"
% TRADE MARK SIGN

View file

@ -1,64 +0,0 @@
Fix a bug in tls initialization which caused __tls_get_addr to return NULL.
We need to postpone all calls to _dl_update_slotinfo until after
_dl_add_to_slotinfo is complete. This is because _dl_update_slotinfo
will modify the generation of the DTV to match that of the new
slot. We cannot allow this to happen until all slots of the generation
have been added.
2010-01-30 Martin von Gagern
References:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=12453
https://github.com/cschwan/sage-on-gentoo/issues/#issue/40
https://bugs.gentoo.org/353224
Index: glibc-2.12.2/elf/dl-open.c
===================================================================
--- glibc-2.12.2.orig/elf/dl-open.c
+++ glibc-2.12.2/elf/dl-open.c
@@ -346,7 +346,7 @@ dl_open_worker (void *a)
/* If the file is not loaded now as a dependency, add the search
list of the newly loaded object to the scope. */
- bool any_tls = false;
+ bool any_tls = false, any_static_tls = false;
for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
{
struct link_map *imap = new->l_searchlist.r_list[i];
@@ -426,6 +426,25 @@ dl_open_worker (void *a)
_dl_add_to_slotinfo (imap);
if (imap->l_need_tls_init)
+ any_static_tls = true;
+
+ /* We have to bump the generation counter. */
+ any_tls = true;
+ }
+ }
+
+ /* We need a second pass for static tls data, because _dl_update_slotinfo
+ must not be run while calls to _dl_add_to_slotinfo are still pending. */
+ if (__builtin_expect (any_static_tls, 0))
+ {
+ for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
+ {
+ struct link_map *imap = new->l_searchlist.r_list[i];
+ if (__builtin_expect (imap->l_need_tls_init, 0)
+ /* The following two can likely be dropped, but let's be extra
+ safe and copy all the conditions for now. */
+ && ! imap->l_init_called
+ && __builtin_expect (imap->l_tls_blocksize > 0, 0))
{
/* For static TLS we have to allocate the memory here
and now. This includes allocating memory in the DTV.
@@ -449,9 +468,6 @@ cannot load any more object with static
GL(dl_init_static_tls) (imap);
assert (imap->l_need_tls_init == 0);
}
-
- /* We have to bump the generation counter. */
- any_tls = true;
}
}

View file

@ -1,32 +0,0 @@
--- glibc-2.13/ChangeLog.orig 2011-04-08 05:49:27.201205590 -0300
+++ glibc-2.13/ChangeLog 2011-04-08 05:50:13.815394267 -0300
@@ -0,0 +1,5 @@
+2010-09-28 Andreas Schwab <schwab@redhat.com>
+
+ * elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
+ before performing relro protection.
+
--- glibc-2.13/elf/rtld.c.orig 2011-04-08 05:47:56.573838933 -0300
+++ glibc-2.13/elf/rtld.c 2011-04-08 05:48:53.401068817 -0300
@@ -2187,6 +2187,10 @@ ERROR: ld.so: object '%s' cannot be load
we need it in the memory handling later. */
GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+ /* Remember the last search directory added at startup, now that
+ malloc will no longer be the one from dl-minimal.c. */
+ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
if (prelinked)
{
if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
@@ -2306,10 +2310,6 @@ ERROR: ld.so: object '%s' cannot be load
lossage);
}
- /* Remember the last search directory added at startup, now that
- malloc will no longer be the one from dl-minimal.c. */
- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
-
if (! prelinked && rtld_multiple_ref)
{
/* There was an explicit ref to the dynamic linker as a shared lib.

View file

@ -0,0 +1,13 @@
--- glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile.orig 2011-07-30 19:11:27.590451172 -0300
+++ glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile 2011-07-30 19:11:57.813615252 -0300
@@ -33,6 +33,10 @@ ifeq ($(subdir),nscd)
nscd-modules += libc-do-syscall
endif
+ifeq ($(subdir),nss)
+libnss_db-sysdep_routines += libc-do-syscall
+endif
+
ifeq ($(subdir),posix)
LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o

View file

@ -0,0 +1,26 @@
--- glibc-2.14-121-g5551a7b/nss/nsswitch.c.nss-upgrade 2011-07-20 02:41:44.000000000 +0200
+++ glibc-2.14-121-g5551a7b/nss/nsswitch.c 2011-07-24 01:06:25.658666115 +0200
@@ -330,9 +330,20 @@ nss_load_library (service_user *ni)
ni->library->lib_handle = __libc_dlopen (shlib_name);
if (ni->library->lib_handle == NULL)
{
- /* Failed to load the library. */
- ni->library->lib_handle = (void *) -1l;
- __set_errno (saved_errno);
+ /* Failed to load the library. Try a fallback. */
+ int n = __snprintf(shlib_name, shlen, "libnss_%s.so.%d.%d",
+ ni->library->name, __GLIBC__, __GLIBC_MINOR__);
+ if (n >= shlen)
+ ni->library->lib_handle = NULL;
+ else
+ ni->library->lib_handle = __libc_dlopen (shlib_name);
+
+ if (ni->library->lib_handle == NULL)
+ {
+ /* Ok, really fail now. */
+ ni->library->lib_handle = (void *) -1l;
+ __set_errno (saved_errno);
+ }
}
else if (is_nscd)
{

View file

@ -0,0 +1,11 @@
--- glibc-2.14-121-g5551a7b/streams/Makefile.fed_streams~ 2011-07-27 15:13:29.702467500 +0000
+++ glibc-2.14-121-g5551a7b/streams/Makefile 2011-07-27 15:13:33.772466409 +0000
@@ -21,7 +21,7 @@
#
subdir := streams
-#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
include ../Rules

View file

@ -0,0 +1,12 @@
--- glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c.orig 2012-02-11 15:25:40.066658360 -0200
+++ glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c 2012-02-11 15:25:53.953718622 -0200
@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid)
}
else
{
- if (!IN6_IS_ADDR_LOOPBACK (address))
+ if (!IN6_IS_ADDR_LOOPBACK (address) &&
+ !IN6_IS_ADDR_LINKLOCAL (address))
seen_ipv6 = true;
}
}

View file

@ -0,0 +1,11 @@
--- glibc-2.15-a316c1f/scripts/check-local-headers.sh.orig 2012-02-11 17:00:16.708816468 -0200
+++ glibc-2.15-a316c1f/scripts/check-local-headers.sh 2012-02-11 17:00:35.235895337 -0200
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -0,0 +1,11 @@
--- glibc-2.16.0/crypt/x86.S.orig 2011-07-16 19:09:42.000000000 +0400
+++ glibc-2.16.0/crypt/x86.S 2012-07-04 15:08:57.743556929 +0400
@@ -42,7 +42,7 @@
#define DO_ALIGN(log) .align (1 << (log))
#endif
-#define BF_FRAME 0x200
+#define BF_FRAME 0x400
#define ctx %esp
#define BF_ptr (ctx)

View file

@ -0,0 +1,11 @@
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/x86.S.orig 2011-07-16 19:09:42.000000000 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/x86.S 2012-07-04 15:08:57.743556929 +0400
@@ -42,7 +42,7 @@
#define DO_ALIGN(log) .align (1 << (log))
#endif
-#define BF_FRAME 0x200
+#define BF_FRAME 0x400
#define ctx %esp
#define BF_ptr (ctx)

View file

@ -0,0 +1,24 @@
--- glibc-2.16.0/crypt/wrapper.c.orig 2012-07-03 18:32:29.000000000 +0400
+++ glibc-2.16.0/crypt/wrapper.c 2012-07-03 18:42:56.935595814 +0400
@@ -326,6 +326,21 @@
weak_alias(__crypt_gensalt, crypt_gensalt)
weak_alias(crypt, fcrypt)
#endif
+/*
+ * To make fcrypt users happy.
+ * They don't need to call init_des.
+ */
+#ifdef _LIBC
+weak_alias (crypt, fcrypt)
+#else
+char *
+__fcrypt (key, salt)
+ const char *key;
+ const char *salt;
+{
+ return crypt (key, salt);
+}
+#endif
#ifdef TEST
static const char *tests[][3] = {

View file

@ -0,0 +1,24 @@
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/wrapper.c.orig 2012-07-03 18:32:29.000000000 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/wrapper.c 2012-07-03 18:42:56.935595814 +0400
@@ -326,6 +326,21 @@
weak_alias(__crypt_gensalt, crypt_gensalt)
weak_alias(crypt, fcrypt)
#endif
+/*
+ * To make fcrypt users happy.
+ * They don't need to call init_des.
+ */
+#ifdef _LIBC
+weak_alias (crypt, fcrypt)
+#else
+char *
+__fcrypt (key, salt)
+ const char *key;
+ const char *salt;
+{
+ return crypt (key, salt);
+}
+#endif
#ifdef TEST
static const char *tests[][3] = {

View file

@ -0,0 +1,37 @@
--- glibc-2.16.0/elf/rtld.c.orig 2012-07-03 14:45:24.564837876 +0400
+++ glibc-2.16.0/elf/rtld.c 2012-07-03 14:50:58.156918323 +0400
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Early statistics require high-precision timing. */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
+
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
@@ -190,6 +193,12 @@
static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2;
+/* Run-time detect availability of high-precision timer? */
+#ifdef HP_TIMING_HWCAP_AVAIL
+# undef HP_TIMING_AVAIL
+# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL
+#endif
+
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
@@ -321,9 +330,8 @@
#endif
-#if HP_TIMING_AVAIL
- HP_TIMING_NOW (GL(dl_cpuclock_offset));
-#endif
+ if (HP_TIMING_AVAIL)
+ HP_TIMING_NOW (GL(dl_cpuclock_offset));
/* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0);

View file

@ -0,0 +1,37 @@
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/elf/rtld.c.orig 2012-07-03 14:45:24.564837876 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/elf/rtld.c 2012-07-03 14:50:58.156918323 +0400
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Early statistics require high-precision timing. */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
+
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
@@ -190,6 +193,12 @@
static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2;
+/* Run-time detect availability of high-precision timer? */
+#ifdef HP_TIMING_HWCAP_AVAIL
+# undef HP_TIMING_AVAIL
+# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL
+#endif
+
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
@@ -321,9 +330,8 @@
#endif
-#if HP_TIMING_AVAIL
- HP_TIMING_NOW (GL(dl_cpuclock_offset));
-#endif
+ if (HP_TIMING_AVAIL)
+ HP_TIMING_NOW (GL(dl_cpuclock_offset));
/* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0);

View file

@ -1,16 +1,5 @@
--- crypt/wrapper.c.org 2008-06-17 13:29:30.000000000 -0600
+++ crypt/wrapper.c 2008-06-17 15:33:47.000000000 -0600
@@ -43,6 +43,10 @@ extern char *_crypt_gensalt_extended_rn(
__CONST char *input, int size, char *output, int output_size);
extern char *_crypt_gensalt_md5_rn(unsigned long count,
__CONST char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha256c_rn(unsigned long count,
+ __CONST char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha512c_rn(unsigned long count,
+ __CONST char *input, int size, char *output, int output_size);
#if defined(__GLIBC__) && defined(_LIBC)
/* crypt.h from glibc-crypt-2.1 will define struct crypt_data for us */
@@ -54,6 +58,11 @@ extern char *__md5_crypt_r(const char *k
extern char *__des_crypt_r(const char *key, const char *salt,
struct crypt_data *data);
@ -145,3 +134,15 @@
+
+ return output;
+}
--- crypt/crypt_gensalt.h.orig 2012-07-04 17:42:27.151565561 +0400
+++ crypt/crypt_gensalt.h 2012-07-04 17:44:20.351588292 +0400
@@ -26,5 +26,9 @@
const char *input, int size, char *output, int output_size);
extern char *_crypt_gensalt_md5_rn(const char *prefix, unsigned long count,
const char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha256c_rn(unsigned long count,
+ const char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha512c_rn(unsigned long count,
+ const char *input, int size, char *output, int output_size);
#endif

View file

@ -0,0 +1,148 @@
--- crypt/wrapper.c.org 2008-06-17 13:29:30.000000000 -0600
+++ crypt/wrapper.c 2008-06-17 15:33:47.000000000 -0600
@@ -54,6 +58,11 @@ extern char *__md5_crypt_r(const char *k
extern char *__des_crypt_r(const char *key, const char *salt,
struct crypt_data *data);
extern struct crypt_data _ufc_foobar;
+/* support for sha256-crypt and sha512-crypt */
+extern char *__sha256_crypt_r (const char *key, const char *salt,
+ char *buffer, int buflen);
+extern char *__sha512_crypt_r (const char *key, const char *salt,
+ char *buffer, int buflen);
#endif
static int _crypt_data_alloc(void **data, int *size, int need)
@@ -142,6 +151,10 @@ char *__crypt_rn(__const char *key, __co
return _crypt_blowfish_rn(key, setting, (char *)data, size);
if (setting[0] == '$' && setting[1] == '1')
return __md5_crypt_r(key, setting, (char *)data, size);
+ if (setting[0] == '$' && setting[1] == '5')
+ return __sha256_crypt_r(key, setting, (char *)data, size);
+ if (setting[0] == '$' && setting[1] == '6')
+ return __sha512_crypt_r(key, setting, (char *)data, size);
if (setting[0] == '$') goto out_einval;
if (setting[0] == '_') {
if (size < sizeof(struct _crypt_extended_data)) goto out_erange;
@@ -181,6 +194,16 @@ char *__crypt_ra(__const char *key, __co
return NULL;
return __md5_crypt_r(key, setting, (char *)*data, *size);
}
+ if (setting[0] == '$' && setting[1] == '5') {
+ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE))
+ return NULL;
+ return __sha256_crypt_r(key, setting, (char *)*data, *size);
+ }
+ if (setting[0] == '$' && setting[1] == '6') {
+ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE))
+ return NULL;
+ return __sha512_crypt_r(key, setting, (char *)*data, *size);
+ }
if (setting[0] == '$') goto out_einval;
if (setting[0] == '_') {
if (_crypt_data_alloc(data, size,
@@ -271,6 +294,12 @@ char *__crypt_gensalt_rn(__CONST char *p
if (!strncmp(prefix, "$1$", 3))
use = _crypt_gensalt_md5_rn;
else
+ if (!strncmp(prefix, "$5$", 3))
+ use = _crypt_gensalt_sha256c_rn;
+ else
+ if (!strncmp(prefix, "$6$", 3))
+ use = _crypt_gensalt_sha512c_rn;
+ else
if (prefix[0] == '_')
use = _crypt_gensalt_extended_rn;
else
--- crypt/crypt_gensalt.c.org 2008-06-17 13:31:49.000000000 -0600
+++ crypt/crypt_gensalt.c 2008-06-17 15:30:35.000000000 -0600
@@ -109,3 +109,78 @@ char *_crypt_gensalt_md5_rn(unsigned lon
return output;
}
+
+char *_crypt_gensalt_sha256c_rn(unsigned long count,
+ __CONST char *input, int size, char *output, int output_size)
+{
+ unsigned long value;
+
+ if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) {
+ if (output_size > 0) output[0] = '\0';
+ __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL);
+ return NULL;
+ }
+
+ output[0] = '$';
+ output[1] = '5';
+ output[2] = '$';
+ value = (unsigned long)(unsigned char)input[0] |
+ ((unsigned long)(unsigned char)input[1] << 8) |
+ ((unsigned long)(unsigned char)input[2] << 16);
+ output[3] = _crypt_itoa64[value & 0x3f];
+ output[4] = _crypt_itoa64[(value >> 6) & 0x3f];
+ output[5] = _crypt_itoa64[(value >> 12) & 0x3f];
+ output[6] = _crypt_itoa64[(value >> 18) & 0x3f];
+ output[7] = '\0';
+
+ if (size >= 6 && output_size >= 3 + 4 + 4 + 1) {
+ value = (unsigned long)(unsigned char)input[3] |
+ ((unsigned long)(unsigned char)input[4] << 8) |
+ ((unsigned long)(unsigned char)input[5] << 16);
+ output[7] = _crypt_itoa64[value & 0x3f];
+ output[8] = _crypt_itoa64[(value >> 6) & 0x3f];
+ output[9] = _crypt_itoa64[(value >> 12) & 0x3f];
+ output[10] = _crypt_itoa64[(value >> 18) & 0x3f];
+ output[11] = '\0';
+ }
+
+ return output;
+}
+
+
+char *_crypt_gensalt_sha512c_rn(unsigned long count,
+ __CONST char *input, int size, char *output, int output_size)
+{
+ unsigned long value;
+
+ if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) {
+ if (output_size > 0) output[0] = '\0';
+ __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL);
+ return NULL;
+ }
+
+ output[0] = '$';
+ output[1] = '6';
+ output[2] = '$';
+ value = (unsigned long)(unsigned char)input[0] |
+ ((unsigned long)(unsigned char)input[1] << 8) |
+ ((unsigned long)(unsigned char)input[2] << 16);
+ output[3] = _crypt_itoa64[value & 0x3f];
+ output[4] = _crypt_itoa64[(value >> 6) & 0x3f];
+ output[5] = _crypt_itoa64[(value >> 12) & 0x3f];
+ output[6] = _crypt_itoa64[(value >> 18) & 0x3f];
+ output[7] = '\0';
+
+ if (size >= 6 && output_size >= 3 + 4 + 4 + 1) {
+ value = (unsigned long)(unsigned char)input[3] |
+ ((unsigned long)(unsigned char)input[4] << 8) |
+ ((unsigned long)(unsigned char)input[5] << 16);
+ output[7] = _crypt_itoa64[value & 0x3f];
+ output[8] = _crypt_itoa64[(value >> 6) & 0x3f];
+ output[9] = _crypt_itoa64[(value >> 12) & 0x3f];
+ output[10] = _crypt_itoa64[(value >> 18) & 0x3f];
+ output[11] = '\0';
+ }
+
+ return output;
+}
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/crypt_gensalt.h.orig 2012-07-04 17:42:27.151565561 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/crypt_gensalt.h 2012-07-04 17:44:20.351588292 +0400
@@ -26,5 +26,9 @@
const char *input, int size, char *output, int output_size);
extern char *_crypt_gensalt_md5_rn(const char *prefix, unsigned long count,
const char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha256c_rn(unsigned long count,
+ const char *input, int size, char *output, int output_size);
+extern char *_crypt_gensalt_sha512c_rn(unsigned long count,
+ const char *input, int size, char *output, int output_size);
#endif

View file

@ -0,0 +1,11 @@
--- glibc-2.16.0/scripts/check-local-headers.sh.orig 2012-07-03 13:31:41.000000000 +0400
+++ glibc-2.16.0/scripts/check-local-headers.sh 2012-07-03 13:58:54.527563305 +0400
@@ -28,7 +28,7 @@
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -0,0 +1,11 @@
--- scripts/check-local-headers.sh.orig 2012-07-03 13:31:41.000000000 +0400
+++ scripts/check-local-headers.sh 2012-07-03 13:58:54.527563305 +0400
@@ -28,7 +28,7 @@
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -0,0 +1,11 @@
--- glibc-2.16.0/time/sys/time.h.orig 2012-06-30 23:12:34.000000000 +0400
+++ glibc-2.16.0/time/sys/time.h 2012-07-03 15:55:56.473832226 +0400
@@ -77,7 +77,7 @@
This call is restricted to the super-user. */
extern int settimeofday (const struct timeval *__tv,
const struct timezone *__tz)
- __THROW __nonnull ((1));
+ __THROW;
/* Adjust the current time of day by the amount in DELTA.
If OLDDELTA is not NULL, it is filled in with the amount

View file

@ -0,0 +1,11 @@
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/time/sys/time.h.orig 2012-06-30 23:12:34.000000000 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/time/sys/time.h 2012-07-03 15:55:56.473832226 +0400
@@ -77,7 +77,7 @@
This call is restricted to the super-user. */
extern int settimeofday (const struct timeval *__tv,
const struct timezone *__tz)
- __THROW __nonnull ((1));
+ __THROW;
/* Adjust the current time of day by the amount in DELTA.
If OLDDELTA is not NULL, it is filled in with the amount

View file

@ -0,0 +1,12 @@
diff -p -up glibc-2.9/Makeconfig.orig glibc-2.9/Makeconfig
--- glibc-2.9/Makeconfig.orig 2008-08-18 05:42:17.000000000 -0400
+++ glibc-2.9/Makeconfig 2009-01-15 09:44:31.000000000 -0500
@@ -226,7 +226,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)

View file

@ -0,0 +1,77 @@
--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100
+++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100
+++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100
+++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100
@@ -93,7 +93,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100
@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat
break;
}
}
- f_print (fout, separator);
+ f_print (fout, "%s", separator);
}
static int
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100
@@ -651,7 +651,7 @@ h_output (const char *infile, const char
}
else if (tblflag)
{
- fprintf (fout, rpcgen_table_dcl);
+ fprintf (fout, "%s", rpcgen_table_dcl);
}
if (Cflag)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100
@@ -361,7 +361,7 @@ write_real_program (const definition * d
f_print (fout, " (");
/* arg name */
if (proc->arg_num > 1)
- f_print (fout, proc->args.argname);
+ f_print (fout, "%s", proc->args.argname);
else
ptype (proc->args.decls->decl.prefix,
proc->args.decls->decl.type, 0);

View file

@ -0,0 +1,88 @@
--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100
+++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100
+++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100
+++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100
@@ -93,7 +93,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100
@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat
break;
}
}
- f_print (fout, separator);
+ f_print (fout, "%s", separator);
}
static int
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100
@@ -651,7 +651,7 @@ h_output (const char *infile, const char
}
else if (tblflag)
{
- fprintf (fout, rpcgen_table_dcl);
+ fprintf (fout, "%s", rpcgen_table_dcl);
}
if (Cflag)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100
@@ -361,7 +361,7 @@ write_real_program (const definition * d
f_print (fout, " (");
/* arg name */
if (proc->arg_num > 1)
- f_print (fout, proc->args.argname);
+ f_print (fout, "%s", proc->args.argname);
else
ptype (proc->args.decls->decl.prefix,
proc->args.decls->decl.type, 0);
--- glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h 2011-12-10 20:44:52.713364002 +0100
@@ -35,7 +35,7 @@ static void
__attribute__ ((__noreturn__))
dl_fatal (const char *str)
{
- _dl_dprintf (2, str);
+ _dl_dprintf (2, "%s", str);
_exit (1);
}
#endif

View file

@ -0,0 +1,16 @@
--- glibc-2.16.0/rt/Makefile.orig 2012-06-30 23:12:34.000000000 +0400
+++ glibc-2.16.0/rt/Makefile 2012-07-03 15:09:01.696678685 +0400
@@ -78,3 +78,13 @@
endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif

View file

@ -0,0 +1,16 @@
--- /home/m/rpmbuild/BUILD/glibc-2.16.0/rt/Makefile.orig 2012-06-30 23:12:34.000000000 +0400
+++ /home/m/rpmbuild/BUILD/glibc-2.16.0/rt/Makefile 2012-07-03 15:09:01.696678685 +0400
@@ -78,3 +78,13 @@
endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif

11
glibc-2.16.0.tar.xz.sig Normal file
View file

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAABAgAGBQJP71ojAAoJECXvCkNsKkr/hW8IANUeX+DLwWU5lJuPTTsl6C3M
GHa3S8h7zV8uIaJPonmX4DumiacQZQLX65A2utoi90s2Y4xBrQQwmlqBzNmJGr0q
HALR14V1kp9b5xF+ovtUE41hUTaCwUBXYUp0ODXwFCJqdYJJFWJ1mUI7rWcE3AHM
MGMVyIKm5gtvRNdxSmR96S2V+5hudavChRGCgwdVy301QvqV8qnizf1WCTmxV3vC
mxjVfqZRnh0721eArz19YtnX7eU86SGWP3QaeIo+7xfpoyqwhh5Y+5yfh6MqZNZk
yCDD9jUfjhcejBTSSMaUKc3ZNssaHKm4FfQeQqCayiGGLzpbdB/WKkPV7wHlebM=
=l5tZ
-----END PGP SIGNATURE-----

View file

@ -1,13 +0,0 @@
--- glibc-2.3.5/crypt/x86.S.avx 2006-07-06 11:16:18.000000000 -0600
+++ glibc-2.3.5/crypt/x86.S 2006-07-06 11:16:30.000000000 -0600
@@ -32,8 +32,8 @@
#define DO_ALIGN(log) .align (1 << (log))
#endif
-#define BF_FRAME 0x200
-#define BF_CLEAN 0x300
+#define BF_FRAME 0x400
+#define BF_CLEAN 0x500
#define ctx %esp
#define BF_ptr (ctx)

View file

@ -1,14 +0,0 @@
--- glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile.ppc-build 2004-04-19 06:18:35.000000000 +0000
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile 2004-11-26 12:50:57.884944570 +0000
@@ -1,4 +1,11 @@
64bit-predefine = __powerpc64__
+
+ifeq ($(config-machine),powerpc)
+ifeq ($(subdir),elf)
+sysdep-others += lddlibc4
+install-bin += lddlibc4
+endif
+endif
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
endif

View file

@ -1,93 +0,0 @@
--- glibc-2.4.90/locale/iso-4217.def.compat-EUR-currencies 2006-04-27 08:54:33.000000000 -0400
+++ glibc-2.4.90/locale/iso-4217.def 2006-05-11 12:00:04.000000000 -0400
@@ -8,6 +8,7 @@
*
* !!! The list has to be sorted !!!
*/
+DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
DEFINE_INT_CURR("ALL") /* Albanian Lek */
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram
DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
DEFINE_INT_CURR("ARS") /* Argentine Peso */
+DEFINE_INT_CURR("ATS") /* Austrian Schilling */
DEFINE_INT_CURR("AUD") /* Australian Dollar */
DEFINE_INT_CURR("AWG") /* Aruba Guilder */
DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
DEFINE_INT_CURR("BBD") /* Barbados Dollar */
DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
+DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
DEFINE_INT_CURR("BIF") /* Burundi Franc */
@@ -45,6 +48,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso *
DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
DEFINE_INT_CURR("CYP") /* Cypriot Pound */
DEFINE_INT_CURR("CZK") /* Czech Koruna */
+DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
DEFINE_INT_CURR("DJF") /* Djibouti Franc */
DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
DEFINE_INT_CURR("DOP") /* Dominican Republic */
@@ -52,16 +56,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dina
DEFINE_INT_CURR("EEK") /* Estonian Kroon */
DEFINE_INT_CURR("EGP") /* Egyptian Pound */
DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
+DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
DEFINE_INT_CURR("EUR") /* European Union Euro */
+DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
DEFINE_INT_CURR("FJD") /* Fiji Dollar */
DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
+DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
DEFINE_INT_CURR("GBP") /* British Pound */
DEFINE_INT_CURR("GEL") /* Georgia Lari */
DEFINE_INT_CURR("GHC") /* Ghana Cedi */
DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
DEFINE_INT_CURR("GNF") /* Guinea Franc */
+DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
DEFINE_INT_CURR("GYD") /* Guyana Dollar */
DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
@@ -70,12 +78,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna
DEFINE_INT_CURR("HTG") /* Haiti Gourde */
DEFINE_INT_CURR("HUF") /* Hungarian Forint */
DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
+DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
DEFINE_INT_CURR("ILS") /* Israeli Shekel */
DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
DEFINE_INT_CURR("IRR") /* Iranian Rial */
DEFINE_INT_CURR("ISK") /* Iceland Krona */
+DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
DEFINE_INT_CURR("JEP") /* Jersey Pound */
DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
@@ -95,6 +105,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Ru
DEFINE_INT_CURR("LRD") /* Liberian Dollar */
DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
+DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
DEFINE_INT_CURR("LVL") /* Latvia Lat */
DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
@@ -115,6 +126,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Me
DEFINE_INT_CURR("NAD") /* Namibia Dollar */
DEFINE_INT_CURR("NGN") /* Nigeria Naira */
DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
+DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
DEFINE_INT_CURR("NOK") /* Norwegian Krone */
DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
@@ -125,6 +137,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Gui
DEFINE_INT_CURR("PHP") /* Philippines Peso */
DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
DEFINE_INT_CURR("PLN") /* Polish Zloty */
+DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
DEFINE_INT_CURR("QAR") /* Qatar Rial */
DEFINE_INT_CURR("ROL") /* Romanian Leu */

View file

@ -1,11 +0,0 @@
--- glibc-2.4.90/include/features.h.gcc4-fortify 2006-04-27 08:54:33.000000000 -0400
+++ glibc-2.4.90/include/features.h 2006-05-11 12:22:19.000000000 -0400
@@ -275,7 +275,7 @@
#endif
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+ && __GNUC_PREREQ (4, 0) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
# if _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
# else

View file

@ -1,132 +0,0 @@
2006-05-17 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* Update and simplify for glibc 2.4.90.
2002-12-07 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
Let an i586 rtld load i686 libraries (especially libpthread)
* elf/rtld.c (HP_TIMING_AVAIL): Redefine to HP_TIMING_HWCAP_AVAIL
since early statistics require high-precision timers.
* sysdeps/generic/ldsodefs.h (rtld_global): Declare
_dl_cpuclock_offset if HP_TIMING_HWCAP_AVAIL is defined too.
* sysdeps/unix/sysv/linux/i386/i586/Makefile: New file.
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.c: New file.
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.h: New file.
--- glibc-2.4.90/elf/rtld.c.i586-hptiming 2006-04-27 14:54:33.000000000 +0200
+++ glibc-2.4.90/elf/rtld.c 2006-05-17 08:31:50.000000000 +0200
@@ -17,6 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* Early statistics require high-precision timing. */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
+
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
@@ -178,6 +181,12 @@ static void dl_main (const ElfW(Phdr) *p
static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2;
+/* Run-time detect availability of high-precision timer? */
+#ifdef HP_TIMING_HWCAP_AVAIL
+# undef HP_TIMING_AVAIL
+# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL
+#endif
+
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
@@ -311,9 +320,8 @@ _dl_start_final (void *arg, struct dl_st
#endif
-#if HP_TIMING_AVAIL
- HP_TIMING_NOW (GL(dl_cpuclock_offset));
-#endif
+ if (HP_TIMING_AVAIL)
+ HP_TIMING_NOW (GL(dl_cpuclock_offset));
/* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0);
--- glibc-2.4.90/sysdeps/generic/ldsodefs.h.i586-hptiming 2006-05-10 15:42:19.000000000 +0200
+++ glibc-2.4.90/sysdeps/generic/ldsodefs.h 2006-05-17 08:13:21.000000000 +0200
@@ -408,7 +408,7 @@ struct rtld_global
/* The object to be initialized first. */
EXTERN struct link_map *_dl_initfirst;
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
+#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL
/* Start time on CPU clock. */
EXTERN hp_timing_t _dl_cpuclock_offset;
#endif
@@ -619,7 +619,7 @@ struct rtld_global_ro
/* All search directories defined at startup. */
EXTERN struct r_search_path_elem *_dl_init_all_dirs;
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
+#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL
/* Overhead of a high-precision timing measurement. */
EXTERN hp_timing_t _dl_hp_timing_overhead;
#endif
--- glibc-2.4.90/sysdeps/i386/i586/Makefile.i586-hptiming 2006-05-17 06:35:29.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/Makefile 2006-05-17 06:35:41.000000000 +0200
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.c.i586-hptiming 2006-05-17 06:36:28.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.c 2006-05-17 08:17:51.000000000 +0200
@@ -0,0 +1,2 @@
+/* We can use the i686 implementation without changes. */
+#include <sysdeps/i386/i686/hp-timing.c>
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.h.i586-hptiming 2006-05-17 06:37:28.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.h 2006-05-17 08:30:06.000000000 +0200
@@ -0,0 +1,43 @@
+#ifndef _HP_HWCAP_TIMING_H
+#define _HP_HWCAP_TIMING_H 1
+
+/* We can use the i686 implementation with slight changes. */
+#include <sysdeps/i386/i686/hp-timing.h>
+
+/* We need the definition of HWCAP_I386_TSC. */
+#include <sysdeps/i386/dl-hwcapinfo.h>
+
+/* We need to perform a runtime check for the timestamp register. */
+#undef HP_TIMING_AVAIL
+#define HP_TIMING_AVAIL (0)
+
+/* HP_TIMING_HWCAP_AVAIL: this macro performs a run-time check for the
+ capability. */
+#define HP_TIMING_HWCAP_AVAIL (_dl_hp_timing_avail())
+
+/* Perform the TSC check. */
+#ifdef NEED_HP_TIMING_HWCAP_AVAIL
+static inline
+unsigned int
+_dl_cpuid_edx (unsigned int op)
+{
+ unsigned int edx;
+ __asm__ __volatile__("push %%ebx ; cpuid ; pop %%ebx"
+ : "=d" (edx) : "a" (op) : "ecx");
+ return edx;
+}
+
+static int
+internal_function
+_dl_hp_timing_avail (void)
+{
+ static int has_tsc = -1;
+
+ if (__builtin_expect (has_tsc == -1, 0))
+ has_tsc = (_dl_cpuid_edx(1) & HWCAP_I386_TSC) == HWCAP_I386_TSC;
+
+ return has_tsc;
+}
+#endif
+
+#endif /* hp-timing.h */

View file

@ -1,24 +0,0 @@
2006-07-26 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* rt/Makefile (tests): Don't run tests in parallel on fine-grained
SMT systems.
--- glibc-2.4.90/rt/Makefile.testsuite-rt-notparallel 2006-02-16 09:32:18.000000000 -0500
+++ glibc-2.4.90/rt/Makefile 2006-10-25 03:00:03.000000000 -0400
@@ -81,6 +81,16 @@ endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif
+
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
$(resolvobjdir)/libresolv.a

View file

@ -1,16 +0,0 @@
--- glibc-2.6.orig/sysdeps/unix/nice.c 2006-08-15 02:24:45.000000000 -0300
+++ glibc-2.6/sysdeps/unix/nice.c 2007-06-25 14:40:24.000000000 -0300
@@ -42,7 +42,12 @@
__set_errno (save);
}
- result = setpriority (PRIO_PROCESS, 0, prio + incr);
+ prio += incr;
+ if (prio < PRIO_MIN)
+ prio = PRIO_MIN;
+ else if (prio >= PRIO_MAX)
+ prio = PRIO_MAX - 1;
+ result = setpriority (PRIO_PROCESS, 0, prio);
if (result == -1)
{
if (errno == EACCES)

View file

@ -1,58 +0,0 @@
2006-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
`clone' function to ensure proper unwinding stop of gdb.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
Index: sysdeps/unix/sysv/linux/i386/clone.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/clone.S,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- sysdeps/unix/sysv/linux/i386/clone.S 4 May 2005 17:52:08 -0000 1.26
+++ sysdeps/unix/sysv/linux/i386/clone.S 3 Dec 2006 23:12:36 -0000 1.27
@@ -120,6 +120,9 @@ L(pseudo_end):
ret
L(thread_start):
+ cfi_startproc;
+ /* Clearing frame pointer is insufficient, use CFI. */
+ cfi_undefined (eip);
/* Note: %esi is zero. */
movl %esi,%ebp /* terminate the stack frame */
#ifdef RESET_PID
@@ -152,6 +155,7 @@ L(nomoregetpid):
jmp L(haspid)
.previous
#endif
+ cfi_endproc;
cfi_startproc
PSEUDO_END (BP_SYM (__clone))
Index: sysdeps/unix/sysv/linux/x86_64/clone.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/x86_64/clone.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- sysdeps/unix/sysv/linux/x86_64/clone.S 31 Mar 2005 10:00:12 -0000 1.6
+++ sysdeps/unix/sysv/linux/x86_64/clone.S 3 Dec 2006 23:12:36 -0000 1.7
@@ -89,6 +89,9 @@ L(pseudo_end):
ret
L(thread_start):
+ cfi_startproc;
+ /* Clearing frame pointer is insufficient, use CFI. */
+ cfi_undefined (rip);
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
xorl %ebp, %ebp
@@ -113,6 +116,7 @@ L(thread_start):
/* Call exit with return value from function call. */
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
+ cfi_endproc;
cfi_startproc;
PSEUDO_END (BP_SYM (__clone))

View file

@ -1,49 +0,0 @@
diff -p -up glibc-2.9/crypt/crypt-entry.c.orig glibc-2.9/crypt/crypt-entry.c
--- glibc-2.9/crypt/crypt-entry.c.orig 2009-01-15 10:43:01.000000000 -0500
+++ glibc-2.9/crypt/crypt-entry.c 2009-01-15 10:43:18.000000000 -0500
@@ -164,18 +164,3 @@ crypt (key, salt)
#endif
-/*
- * To make fcrypt users happy.
- * They don't need to call init_des.
- */
-#ifdef _LIBC
-weak_alias (crypt, fcrypt)
-#else
-char *
-__fcrypt (key, salt)
- const char *key;
- const char *salt;
-{
- return crypt (key, salt);
-}
-#endif
diff -p -up glibc-2.9/crypt/wrapper.c.orig glibc-2.9/crypt/wrapper.c
--- glibc-2.9/crypt/wrapper.c.orig 2009-01-15 10:43:01.000000000 -0500
+++ glibc-2.9/crypt/wrapper.c 2009-01-15 10:43:18.000000000 -0500
@@ -326,7 +326,22 @@ weak_alias(__crypt_gensalt_rn, crypt_gen
weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
weak_alias(__crypt_gensalt, crypt_gensalt)
#endif
-
+/*
+ * To make fcrypt users happy.
+ * They don't need to call init_des.
+ */
+#ifdef _LIBC
+weak_alias (crypt, fcrypt)
+#else
+char *
+__fcrypt (key, salt)
+ const char *key;
+ const char *salt;
+{
+ return crypt (key, salt);
+}
+#endif
+
#ifdef TEST
static struct {
char *hash;

View file

@ -1,40 +0,0 @@
diff -p -up glibc-2.9/elf/ldd.bash.in.orig glibc-2.9/elf/ldd.bash.in
--- glibc-2.9/elf/ldd.bash.in.orig 2008-01-02 14:25:22.000000000 -0500
+++ glibc-2.9/elf/ldd.bash.in 2009-01-15 07:47:41.000000000 -0500
@@ -31,6 +31,7 @@ RTLDLIST=@RTLD@
warn=
bind_now=
verbose=
+file_magic_regex="ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib)"
while test $# -gt 0; do
case "$1" in
@@ -151,8 +152,11 @@ for file do
echo "ldd: ${file}:" $"not regular file" >&2
result=1
elif test -r "$file"; then
+ if eval file -L "$file" 2>/dev/null \
+ | sed 10q | egrep -v "$file_magic_regex" > /dev/null; then
test -x "$file" || echo 'ldd:' $"\
warning: you do not have execution permission for" "\`$file'" >&2
+ fi
RTLD=
ret=1
for rtld in ${RTLDLIST}; do
@@ -169,8 +173,14 @@ warning: you do not have execution permi
# If the program exits with exit code 5, it means the process has been
# invoked with __libc_enable_secure. Fall back to running it through
# the dynamic linker.
- try_trace "$file"
- rc=$?
+ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
+ | sed 10q | egrep "$file_magic_regex" > /dev/null; then
+ try_trace "$RTLD" "$file"
+ rc=$?
+ else
+ try_trace "$file"
+ rc=$?
+ fi
if [ $rc = 5 ]; then
try_trace "$RTLD" "$file"
rc=$?

2395
glibc-fedora.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,140 +0,0 @@
#!/bin/bash
#
# Auto-generate requirements for executables (both ELF and a.out) and library
# sonames, script interpreters, and perl modules.
#
ulimit -c 0
#
# --- Set needed to 0 for traditional find-requires behavior.
needed=0
if [ X"$1" = Xldd ]; then
needed=0
elif [ X"$1" = Xobjdump ]; then
needed=1
fi
#
# --- Mandrake Linux specific part
#
# --- Grab the file manifest and classify files.
filelist=`sed "s/['\"]/\\\&/g"`
exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | grep -v /usr/doc | grep -v /usr/share/doc | xargs -r file | \
egrep ":.* (commands|script) " | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
interplist=
perllist=
pythonlist=
tcllist=
#
# --- Alpha does not mark 64bit dependencies
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
if [ "$needed" -eq 0 ]; then
#
# --- Executable dependency sonames.
for f in $exelist; do
[ -r $f -a -x $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u | grep -v 'libsafe|libfakeroot'
#
# --- Library dependency sonames.
for f in $liblist; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u | grep -v 'libsafe|libfakeroot'
fi
#
# --- Perl or python deps
#
# --- Script interpreters.
for f in $scriptlist; do
[ -r $f -a -x $f ] || continue
interp=`head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1`
interplist="$interplist $interp"
case $interp in
*/perl) perllist="$perllist $f" ;;
esac
done
if [ -n "$interplist" ]; then
for i in `echo "$interplist" | tr '[:blank:]' \\\n | sort -u`; do
if ! rpm -qf $i --qf '%{NAME}\n' 2>/dev/null; then
echo $i
fi
done | sort -u | grep -v 'libsafe|libfakeroot'
fi
#
# --- Add perl module files to perllist.
for f in $filelist; do
[ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f"
done
#
# --- Weak symbol versions (from glibc).
[ -n "$mark64" ] && mark64="(64bit)"
for f in $liblist $exelist ; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; }
/^$/ { START=0; }
/^Dynamic Section:$/ { START=1; }
(START==1) && /NEEDED/ {
if (needed) { print $2 ; }
}
/^Version References:$/ { START=2; }
(START==2) && /required from/ {
sub(/:/, "", $3);
LIBNAME=$3;
}
(START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) {
print LIBNAME "(" $4 ")'$lib64'";
}
'
done | sort -u | grep -v 'libsafe|libfakeroot'
#
# --- Perl modules.
#[ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \
# echo $perllist | tr '[:blank:]' \\n | /usr/lib/rpm/perl.req | sort -u
#
# --- Python modules.
[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \
echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.req | sort -u
#
# --- Tcl modules.
[ -x /usr/lib/rpm/tcl.req -a -n "$tcllist" ] && \
echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.req | sort -u
exit 0

View file

@ -0,0 +1,36 @@
--- glibc-2.15-a316c1f/misc/sys/cdefs.h.orig 2012-02-11 15:42:05.510993089 -0200
+++ glibc-2.15-a316c1f/misc/sys/cdefs.h 2012-02-11 15:42:48.358183501 -0200
@@ -38,30 +38,20 @@
#ifdef __GNUC__
-/* All functions, except those with callbacks or those that
- synchronize memory, are leaf functions. */
-# if __GNUC_PREREQ (4, 6) && !defined _LIBC
-# define __LEAF , __leaf__
-# define __LEAF_ATTR __attribute__ ((__leaf__))
-# else
-# define __LEAF
-# define __LEAF_ATTR
-# endif
-
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
-# define __THROW __attribute__ ((__nothrow__ __LEAF))
+# define __THROW __attribute__ ((__nothrow__))
# define __THROWNL __attribute__ ((__nothrow__))
-# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# define __THROWNL throw ()
-# define __NTH(fct) __LEAF_ATTR fct throw ()
+# define __NTH(fct) fct throw ()
# else
# define __THROW
# define __THROWNL

View file

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAABAgAGBQJP71okAAoJECXvCkNsKkr/sNQIAL9cDaYqmOuvl2dNQoAgZxHW
43BhiOG3gOSGzooEGFSwJZdR1QlT8Nk9/SMIpiR6m5v6EzT/UjmpXE9l8FgwR31X
aXZDGqWy+kvpAkPh+xGzPVTaGHHifuGTUQQctiEMfMiGdjl9sSV42YpTARb//xgE
qPA2MhBWZOCjJgY9D4rGlV9sopZ99jbntv69O0RcKDGNrciGE/DuuXXmLtnfSI3F
XxpZWVZMNUQDU73bWXCCbe/agVOmmvGz0SY9T+RA1ui4XBk705m+9JrWqe00xqJi
t9UkjU7DsTZ86q+lnCTMV4/LpAehUsgKYJnzgraI1t/bxrHZQk3BsmPqhxScO1Y=
=4OMI
-----END PGP SIGNATURE-----

View file

@ -1,141 +0,0 @@
/* Portions derived from Fedora Core glibc_post_upgrade.c */
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#define verbose_exec(failcode, path...) \
do \
{ \
char *const arr[] = { path, NULL }; \
vexec (failcode, arr); \
} while (0)
__attribute__((noinline)) void vexec (int failcode, char *const path[]);
__attribute__((noinline)) void says (const char *str);
__attribute__((noinline)) void sayn (long num);
__attribute__((noinline)) void message (char *const path[]);
int main(int argc, char *argv[])
{
static const char *libs[] = {
"libc.so.6",
"libm.so.6",
"libpthread.so.0",
"librt.so.1",
"libthread_db.so.1"
};
static const char *dirs[] = {
SLIBDIR "/tls"
};
int i, j, ret;
/* Remove obsolete libraries. */
for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
for (j = 0; j < sizeof(libs) / sizeof(libs[0]); j++) {
char path[PATH_MAX], temp_path[PATH_MAX];
ret = snprintf(path, sizeof(path), "%s/%s", dirs[i], libs[j]);
if (ret < 0 || ret >= sizeof(path))
continue;
if ((ret = readlink(path, temp_path, sizeof(temp_path) - 1)) != -1) {
char resolved_path[PATH_MAX];
temp_path[ret] = '\0';
if (temp_path[0] == '/')
strcpy(resolved_path, temp_path);
else
ret = snprintf(resolved_path, sizeof(resolved_path), "%s/%s", dirs[i], temp_path);
if (ret > 0 && ret < sizeof(resolved_path))
unlink(resolved_path);
}
unlink(path);
}
}
/* Update ld.so.cache only. */
if (access("/sbin/ldconfig", X_OK) == 0)
verbose_exec(110, "/sbin/ldconfig", "/sbin/ldconfig", "-X");
/* Delegate to ash for normal %post execution. */
argv[0] = ASH_BIN;
execv(ASH_BIN, argv);
return 0;
}
void
vexec (int failcode, char *const path[])
{
pid_t pid;
int status, save_errno;
pid = vfork ();
if (pid == 0)
{
execv (path[0], path + 1);
save_errno = errno;
message (path);
says (" exec failed with errno ");
sayn (save_errno);
says ("\n");
_exit (failcode);
}
else if (pid < 0)
{
save_errno = errno;
message (path);
says (" fork failed with errno ");
sayn (save_errno);
says ("\n");
_exit (failcode + 1);
}
if (waitpid (0, &status, 0) != pid || !WIFEXITED (status))
{
message (path);
says (" child terminated abnormally\n");
_exit (failcode + 2);
}
if (WEXITSTATUS (status))
{
message (path);
says (" child exited with exit code ");
sayn (WEXITSTATUS (status));
says ("\n");
_exit (WEXITSTATUS (status));
}
}
void
says (const char *str)
{
write (1, str, strlen (str));
}
void
sayn (long num)
{
char string[sizeof (long) * 3 + 1];
char *p = string + sizeof (string) - 1;
*p = '\0';
if (num == 0)
*--p = '0';
else
while (num)
{
*--p = '0' + num % 10;
num = num / 10;
}
says (p);
}
void
message (char *const path[])
{
says ("/usr/sbin/glibc_post_upgrade: While trying to execute ");
says (path[0]);
}

157
glibc-rh179072.patch Normal file
View file

@ -0,0 +1,157 @@
diff -Nrup a/elf/dl-close.c b/elf/dl-close.c
--- a/elf/dl-close.c 2012-01-25 21:49:58.892869984 -0700
+++ b/elf/dl-close.c 2012-01-25 21:50:22.283882509 -0700
@@ -32,6 +32,7 @@
#include <sys/mman.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
/* Type of the constructor functions. */
@@ -469,6 +470,7 @@ _dl_close_worker (struct link_map *map)
struct r_debug *r = _dl_debug_initialize (0, nsid);
r->r_state = RT_DELETE;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_start, 2, nsid, r);
if (unload_global)
{
@@ -738,6 +740,7 @@ _dl_close_worker (struct link_map *map)
/* Notify the debugger those objects are finalized and gone. */
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_complete, 2, nsid, r);
/* Recheck if we need to retry, release the lock. */
out:
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-01-25 21:49:58.895869986 -0700
+++ b/elf/dl-load.c 2012-01-25 21:50:22.288882511 -0700
@@ -36,6 +36,7 @@
#include <stackinfo.h>
#include <caller.h>
#include <sysdep.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -881,7 +882,7 @@ _dl_init_paths (const char *llp)
static void
__attribute__ ((noreturn, noinline))
lose (int code, int fd, const char *name, char *realname, struct link_map *l,
- const char *msg, struct r_debug *r)
+ const char *msg, struct r_debug *r, Lmid_t nsid)
{
/* The file might already be closed. */
if (fd != -1)
@@ -895,6 +896,7 @@ lose (int code, int fd, const char *name
{
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, nsid, r);
}
_dl_signal_error (code, name, NULL, msg);
@@ -933,7 +935,7 @@ _dl_map_object_from_fd (const char *name
errval = errno;
call_lose:
lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL);
+ make_consistent ? r : NULL, nsid);
}
/* Look again to see if the real name matched another already loaded. */
@@ -1040,6 +1042,7 @@ _dl_map_object_from_fd (const char *name
linking has not been used before. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_start, 2, nsid, r);
make_consistent = true;
}
else
@@ -1735,7 +1738,7 @@ open_verify (const char *name, struct fi
name = strdupa (realname);
free (realname);
}
- lose (errval, fd, name, NULL, NULL, errstring, NULL);
+ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0);
}
/* See whether the ELF header is what we expect. */
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-open.c 2012-01-25 21:50:22.291882514 -0700
@@ -33,6 +33,7 @@
#include <caller.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -292,6 +293,7 @@ dl_open_worker (void *a)
struct r_debug *r = _dl_debug_initialize (0, args->nsid);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, args->nsid, r);
/* Print scope information. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
@@ -308,10 +310,18 @@ dl_open_worker (void *a)
struct link_map *l = new;
while (l->l_next)
l = l->l_next;
+ int relocation_in_progress = 0;
while (1)
{
if (! l->l_real->l_relocated)
{
+ if (! relocation_in_progress)
+ {
+ /* Notify the debugger that relocations are about to happen. */
+ LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r);
+ relocation_in_progress = 1;
+ }
+
#ifdef SHARED
if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
{
@@ -481,6 +491,10 @@ cannot load any more object with static
}
}
+ /* Notify the debugger all new objects have been relocated. */
+ if (relocation_in_progress)
+ LIBC_PROBE (rtld_reloc_complete, 2, args->nsid, r);
+
/* Run the initializer functions of new objects. */
_dl_init (new, args->argc, args->argv, args->env);
diff -Nrup a/elf/rtld.c b/elf/rtld.c
--- a/elf/rtld.c 2012-01-25 21:49:58.898869987 -0700
+++ b/elf/rtld.c 2012-01-25 21:53:42.262987201 -0700
@@ -40,6 +40,7 @@
#include <dl-osinfo.h>
#include <dl-procinfo.h>
#include <tls.h>
+#include <stap-probe.h>
#include <stackinfo.h>
#include <assert.h>
@@ -1670,6 +1671,7 @@ ERROR: ld.so: object '%s' cannot be load
/* We start adding objects. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_start, 2, LM_ID_BASE, r);
/* Auditing checkpoint: we are ready to signal that the initial map
is being constructed. */
@@ -2382,6 +2384,7 @@ ERROR: ld.so: object '%s' cannot be load
r = _dl_debug_initialize (0, LM_ID_BASE);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_complete, 2, LM_ID_BASE, r);
#ifndef MAP_COPY
/* We must munmap() the cache file. */

12
glibc-rh564528.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/manual/stdio.texi b/manual/stdio.texi
--- a/manual/stdio.texi 2012-01-01 05:16:32.000000000 -0700
+++ b/manual/stdio.texi 2012-02-09 23:46:31.660912211 -0700
@@ -2324,6 +2324,8 @@ the @var{size} argument specifies the ma
produce. The trailing null character is counted towards this limit, so
you should allocate at least @var{size} characters for the string @var{s}.
+The trailing null byte is added to @var{s}, unless @var{size} is zero.
+
The return value is the number of characters which would be generated
for the given input, excluding the trailing null. If this value is
greater or equal to @var{size}, not all characters from the result have

20
glibc-rh657588.patch Normal file
View file

@ -0,0 +1,20 @@
diff -rup a/localedata/locales/zh_CN b/localedata/locales/zh_CN
--- a/localedata/locales/zh_CN 2006-07-30 16:19:43.000000000 -0600
+++ b/localedata/locales/zh_CN 2012-01-30 21:24:46.905115483 -0700
@@ -108,11 +108,11 @@ day "<U661F><U671F><U65E5>";/
"<U661F><U671F><U4E94>";/
"<U661F><U671F><U516D>"
-abmon "<U0020><U0031><U6708>";"<U0020><U0032><U6708>";/
- "<U0020><U0033><U6708>";"<U0020><U0034><U6708>";/
- "<U0020><U0035><U6708>";"<U0020><U0036><U6708>";/
- "<U0020><U0037><U6708>";"<U0020><U0038><U6708>";/
- "<U0020><U0039><U6708>";"<U0031><U0030><U6708>";/
+abmon "<U0031><U6708>";"<U0032><U6708>";/
+ "<U0033><U6708>";"<U0034><U6708>";/
+ "<U0035><U6708>";"<U0036><U6708>";/
+ "<U0037><U6708>";"<U0038><U6708>";/
+ "<U0039><U6708>";"<U0031><U0030><U6708>";/
"<U0031><U0031><U6708>";"<U0031><U0032><U6708>"
mon "<U4E00><U6708>";"<U4E8C><U6708>";"<U4E09><U6708>";/

37
glibc-rh688948.patch Normal file
View file

@ -0,0 +1,37 @@
diff -rNup a/fedora/glibc_post_upgrade.c b/fedora/glibc_post_upgrade.c
--- a/fedora/glibc_post_upgrade.c 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc_post_upgrade.c 2012-02-06 11:02:03.236713830 -0700
@@ -60,6 +60,7 @@ is_ia64 (void)
int
main (void)
{
+ struct stat statbuf;
char initpath[256];
char buffer[4096];
@@ -170,12 +171,24 @@ main (void)
|| ((!!access ("/dev/initctl", F_OK))
^ !access ("/sbin/initctl", X_OK)))
_exit (0);
+
/* Check if we are not inside of some chroot, because we'd just
- timeout and leave /etc/initrunlvl. */
+ timeout and leave /etc/initrunlvl.
+
+ On more modern systems this test is not sufficient to detect
+ if we're in a chroot. */
if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||
readlink ("/proc/1/root", initpath, 256) <= 0)
_exit (0);
+ /* Here's another well known way to detect chroot, at least on an
+ ext and xfs filesystems and assuming nothing mounted on the chroot's
+ root. */
+ if (stat ("/", &statbuf) != 0
+ || (statbuf.st_ino != 2
+ && statbuf.st_ino != 128))
+ _exit (0);
+
if (check_elf ("/proc/1/exe"))
verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");

11
glibc-rh691912.patch Normal file
View file

@ -0,0 +1,11 @@
diff -rup a/sunrpc/etc.rpc b/sunrpc/etc.rpc
--- a/sunrpc/etc.rpc 2012-01-01 05:16:32.000000000 -0700
+++ b/sunrpc/etc.rpc 2012-02-03 14:24:45.615462110 -0700
@@ -62,6 +62,7 @@ sadmind 100232
nisd 100300 rpc.nisd
nispasswd 100303 rpc.nispasswdd
ufsd 100233 ufsd
+fedfs_admin 100418
pcnfsd 150001 pcnfs
amd 300019 amq
sgi_fam 391002 fam

14
glibc-rh697149.patch Normal file
View file

@ -0,0 +1,14 @@
diff -rup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
--- a/sysdeps/unix/sysv/linux/check_pf.c 2012-02-16 22:51:17.148797741 -0700
+++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-02-17 10:55:26.513139941 -0700
@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid)
}
else
{
- if (!IN6_IS_ADDR_LOOPBACK (address))
+ if (!IN6_IS_ADDR_LOOPBACK (address)
+ && !IN6_IS_ADDR_LINKLOCAL (address))
seen_ipv6 = true;
}
}
Only in b/sysdeps/x86_64: .dl-trampoline.S.swp

10
glibc-rh697421.patch Normal file
View file

@ -0,0 +1,10 @@
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
alias OSF10010004// HP-GREEK8//
module HP-GREEK8// INTERNAL HP-GREEK8 1
module INTERNAL HP-GREEK8// HP-GREEK8 1
+
+alias ISO-10646-UCS-2// UNICODE//
+alias ISO-10646-UCS-2// ISO-10646/UTF8/

52
glibc-rh730856.patch Normal file
View file

@ -0,0 +1,52 @@
diff -rup a/resolv/res_query.c b/resolv/res_query.c
--- a/resolv/res_query.c 2012-02-16 22:51:17.451796009 -0700
+++ b/resolv/res_query.c 2012-02-16 22:54:42.522623598 -0700
@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
int *resplen2)
{
HEADER *hp = (HEADER *) answer;
+ HEADER *hp2;
int n, use_malloc = 0;
u_int oflags = statp->_flags;
@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
/* __libc_res_nsend might have reallocated the buffer. */
hp = (HEADER *) *answerp;
- /* We simplify the following tests by assigning HP to HP2. It
- is easy to verify that this is the same as ignoring all
- tests of HP2. */
- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
-
- if (n < (int) sizeof (HEADER) && answerp2 != NULL
- && *resplen2 > (int) sizeof (HEADER))
+ /* We simplify the following tests by assigning HP to HP2 or
+ vice versa. It is easy to verify that this is the same as
+ ignoring all tests of HP or HP2. */
+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
{
- /* Special case of partial answer. */
- assert (hp != hp2);
- hp = hp2;
+ hp2 = hp;
}
- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
- && n > (int) sizeof (HEADER))
+ else
{
- /* Special case of partial answer. */
- assert (hp != hp2);
- hp2 = hp;
+ hp2 = (HEADER *) *answerp2;
+ if (n < (int) sizeof (HEADER))
+ {
+ hp = hp2;
+ }
}
+ /* Make sure both hp and hp2 are defined */
+ assert((hp != NULL) && (hp2 != NULL));
+
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
&& (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
#ifdef DEBUG

55
glibc-rh739743.patch Normal file
View file

@ -0,0 +1,55 @@
2009-04-26 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
result if the result has no associated interface.
---
sysdeps/posix/getaddrinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1456,13 +1456,13 @@
/* Fill in the results in all the records. */
for (int i = 0; i < src->nresults; ++i)
- if (src->results[i].index == a1_index)
+ if (a1_index != -1 && src->results[i].index == a1_index)
{
assert (src->results[i].native == -1
|| src->results[i].native == a1_native);
src->results[i].native = a1_native;
}
- else if (src->results[i].index == a2_index)
+ else if (a2_index != -1 && src->results[i].index == a2_index)
{
assert (src->results[i].native == -1
|| src->results[i].native == a2_native);
2009-03-15 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect
interface for all 127.X.Y.Z addresses.
---
sysdeps/posix/getaddrinfo.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -2265,7 +2265,14 @@
tmp.addr[0] = 0;
tmp.addr[1] = 0;
tmp.addr[2] = htonl (0xffff);
- tmp.addr[3] = sinp->sin_addr.s_addr;
+ /* Special case for lo interface, the source address
+ being possibly different than the interface
+ address. */
+ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
+ == 0x7f000000)
+ tmp.addr[3] = htonl(0x7f000001);
+ else
+ tmp.addr[3] = sinp->sin_addr.s_addr;
}
else
{

21
glibc-rh741105.patch Normal file
View file

@ -0,0 +1,21 @@
diff -rup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-02-03 10:59:58.917870716 -0700
+++ b/elf/dl-load.c 2012-02-03 11:01:01.796580644 -0700
@@ -1130,6 +1130,16 @@ _dl_map_object_from_fd (const char *name
= N_("ELF load command address/offset not properly aligned");
goto call_lose;
}
+ if (__builtin_expect ((ph->p_offset + ph->p_filesz > st.st_size), 0))
+ {
+ /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page.
+ There's still a possibility of a race, if the shared
+ object is truncated between the fxstat above and the
+ memset below. */
+ errstring = N_("ELF load command past end of file");
+ goto call_lose;
+ }
c = &loadcmds[nloadcmds++];
c->mapstart = ph->p_vaddr & ~(GLRO(dl_pagesize) - 1);
Only in b/elf: dl-load.c.orig

167
glibc-rh757881.patch Normal file
View file

@ -0,0 +1,167 @@
diff -Nrup a/malloc/arena.c b/malloc/arena.c
--- a/malloc/arena.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/arena.c 2012-05-30 00:13:40.683514016 -0600
@@ -673,7 +673,7 @@ heap_trim(heap_info *heap, size_t pad)
heap = prev_heap;
if(!prev_inuse(p)) { /* consolidate backward */
p = prev_chunk(p);
- unlink(p, bck, fwd);
+ unlink(ar_ptr, p, bck, fwd);
}
assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0);
assert( ((char*)p + new_size) == ((char*)heap + heap->size) );
diff -Nrup a/malloc/hooks.c b/malloc/hooks.c
--- a/malloc/hooks.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/hooks.c 2012-05-30 00:13:40.684514011 -0600
@@ -191,7 +191,9 @@ top_check(void)
(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
return 0;
+ mutex_unlock(&main_arena);
malloc_printerr (check_action, "malloc: top chunk is corrupt", t);
+ mutex_lock(&main_arena);
/* Try to set up a new top chunk. */
brk = MORECORE(0);
diff -Nrup a/malloc/malloc.c b/malloc/malloc.c
--- a/malloc/malloc.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/malloc.c 2012-05-30 00:13:40.686514001 -0600
@@ -1424,12 +1424,14 @@ typedef struct malloc_chunk* mbinptr;
#define last(b) ((b)->bk)
/* Take a chunk off a bin list */
-#define unlink(P, BK, FD) { \
+#define unlink(AV, P, BK, FD) { \
FD = P->fd; \
BK = P->bk; \
- if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) \
+ if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) { \
+ mutex_unlock(&(AV)->mutex); \
malloc_printerr (check_action, "corrupted double-linked list", P); \
- else { \
+ mutex_lock(&(AV)->mutex); \
+ } else { \
FD->bk = BK; \
BK->fd = FD; \
if (!in_smallbin_range (P->size) \
@@ -2511,7 +2513,9 @@ static void* sysmalloc(INTERNAL_SIZE_T n
else if (contiguous(av) && old_size && brk < old_end) {
/* Oops! Someone else killed our space.. Can't touch anything. */
+ mutex_unlock(&av->mutex);
malloc_printerr (3, "break adjusted to free malloc space", brk);
+ mutex_lock(&av->mutex);
}
/*
@@ -3345,7 +3349,9 @@ _int_malloc(mstate av, size_t bytes)
{
errstr = "malloc(): memory corruption (fast)";
errout:
+ mutex_unlock(&av->mutex);
malloc_printerr (check_action, errstr, chunk2mem (victim));
+ mutex_lock(&av->mutex);
return NULL;
}
check_remalloced_chunk(av, victim, nb);
@@ -3430,8 +3436,12 @@ _int_malloc(mstate av, size_t bytes)
bck = victim->bk;
if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (victim->size > av->system_mem, 0))
- malloc_printerr (check_action, "malloc(): memory corruption",
- chunk2mem (victim));
+ {
+ void *p = chunk2mem(victim);
+ mutex_unlock(&av->mutex);
+ malloc_printerr (check_action, "malloc(): memory corruption", p);
+ mutex_lock(&av->mutex);
+ }
size = chunksize(victim);
/*
@@ -3572,7 +3582,7 @@ _int_malloc(mstate av, size_t bytes)
victim = victim->fd;
remainder_size = size - nb;
- unlink(victim, bck, fwd);
+ unlink(av, victim, bck, fwd);
/* Exhaust */
if (remainder_size < MINSIZE) {
@@ -3670,7 +3680,7 @@ _int_malloc(mstate av, size_t bytes)
remainder_size = size - nb;
/* unlink */
- unlink(victim, bck, fwd);
+ unlink(av, victim, bck, fwd);
/* Exhaust */
if (remainder_size < MINSIZE) {
@@ -3805,9 +3815,11 @@ _int_free(mstate av, mchunkptr p, int ha
{
errstr = "free(): invalid pointer";
errout:
- if (! have_lock && locked)
+ if (have_lock || locked)
(void)mutex_unlock(&av->mutex);
malloc_printerr (check_action, errstr, chunk2mem(p));
+ if (have_lock)
+ mutex_lock(&av->mutex);
return;
}
/* We know that each chunk is at least MINSIZE bytes in size or a
@@ -3952,7 +3964,7 @@ _int_free(mstate av, mchunkptr p, int ha
prevsize = p->prev_size;
size += prevsize;
p = chunk_at_offset(p, -((long) prevsize));
- unlink(p, bck, fwd);
+ unlink(av, p, bck, fwd);
}
if (nextchunk != av->top) {
@@ -3961,7 +3973,7 @@ _int_free(mstate av, mchunkptr p, int ha
/* consolidate forward */
if (!nextinuse) {
- unlink(nextchunk, bck, fwd);
+ unlink(av, nextchunk, bck, fwd);
size += nextsize;
} else
clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4122,7 +4134,7 @@ static void malloc_consolidate(mstate av
prevsize = p->prev_size;
size += prevsize;
p = chunk_at_offset(p, -((long) prevsize));
- unlink(p, bck, fwd);
+ unlink(av, p, bck, fwd);
}
if (nextchunk != av->top) {
@@ -4130,7 +4142,7 @@ static void malloc_consolidate(mstate av
if (!nextinuse) {
size += nextsize;
- unlink(nextchunk, bck, fwd);
+ unlink(av, nextchunk, bck, fwd);
} else
clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4199,7 +4211,9 @@ _int_realloc(mstate av, mchunkptr oldp,
{
errstr = "realloc(): invalid old size";
errout:
+ mutex_unlock(&av->mutex);
malloc_printerr (check_action, errstr, chunk2mem(oldp));
+ mutex_lock(&av->mutex);
return NULL;
}
@@ -4241,7 +4255,7 @@ _int_realloc(mstate av, mchunkptr oldp,
(unsigned long)(newsize = oldsize + nextsize) >=
(unsigned long)(nb)) {
newp = oldp;
- unlink(next, bck, fwd);
+ unlink(av, next, bck, fwd);
}
/* allocate, copy, free */

76
glibc-rh767693-2.patch Normal file
View file

@ -0,0 +1,76 @@
diff -rup a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
--- a/sunrpc/svc_tcp.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_tcp.c 2012-06-05 11:30:09.948733571 -0600
@@ -44,6 +44,7 @@
#include <sys/poll.h>
#include <errno.h>
#include <stdlib.h>
+#include <time.h>
#include <wchar.h>
#include <libio/iolibio.h>
@@ -247,6 +248,11 @@ again:
{
if (errno == EINTR)
goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
return FALSE;
}
/*
diff -rup a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
--- a/sunrpc/svc_udp.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_udp.c 2012-06-05 11:30:09.948733571 -0600
@@ -40,6 +40,7 @@
#include <sys/socket.h>
#include <errno.h>
#include <libintl.h>
+#include <time.h>
#ifdef IP_PKTINFO
#include <sys/uio.h>
@@ -277,8 +278,16 @@ again:
(int) su->su_iosz, 0,
(struct sockaddr *) &(xprt->xp_raddr), &len);
xprt->xp_addrlen = len;
- if (rlen == -1 && errno == EINTR)
- goto again;
+ if (rlen == -1)
+ {
+ if (errno == EINTR)
+ goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
+ }
if (rlen < 16) /* < 4 32-bit ints? */
return FALSE;
xdrs->x_op = XDR_DECODE;
diff -rup a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
--- a/sunrpc/svc_unix.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_unix.c 2012-06-05 11:30:36.495612770 -0600
@@ -46,6 +46,7 @@
#include <errno.h>
#include <stdlib.h>
#include <libintl.h>
+#include <time.h>
#include <wchar.h>
/*
@@ -244,6 +245,11 @@ again:
{
if (errno == EINTR)
goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
return FALSE;
}
/*

217
glibc-rh769421.patch Normal file
View file

@ -0,0 +1,217 @@
diff -Nrup c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:20.732670548 -0600
+++ d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:52.667518135 -0600
@@ -137,7 +137,6 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 18f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
movl %ebp, %edx
xorl %esi, %esi
@@ -151,9 +150,6 @@ __pthread_cond_wait:
sete 16(%esp)
je 19f
- cmpl $-EAGAIN, %eax
- je 91f
-
/* Normal and PI futexes dont mix. Use normal futex functions only
if the kernel does not support the PI futex functions. */
cmpl $-ENOSYS, %eax
@@ -398,78 +394,6 @@ __pthread_cond_wait:
#endif
call __lll_unlock_wake
jmp 11b
-
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
-
- /* Get internal lock. */
- movl $1, %edx
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %edx, (%ebx)
-#else
- cmpxchgl %edx, cond_lock(%ebx)
-#endif
- jz 92f
-
-#if cond_lock == 0
- movl %ebx, %edx
-#else
- leal cond_lock(%ebx), %edx
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_lock_wait
-
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- addl $1, cond_futex(%ebx)
- movl cond_futex(%ebx), %ebp
-
- /* Unlock. */
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- je 93f
-#if cond_lock == 0
- movl %ebx, %eax
-#else
- leal cond_lock(%ebx), %eax
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_unlock_wake
-
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorl %ecx, %ecx
- movl dep_mutex(%ebx), %edi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -642,10 +566,6 @@ __condvar_w_cleanup:
.long .LcleanupEND-.Lsub_cond_futex
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
- .long .LcleanupSTART2-.LSTARTCODE
- .long .LcleanupEND2-.LcleanupSTART2
- .long __condvar_w_cleanup-.LSTARTCODE
- .uleb128 0
.long .LcallUR-.LSTARTCODE
.long .LENDCODE-.LcallUR
.long 0
diff -Nrup c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-20 23:58:20.736670528 -0600
+++ d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-21 00:01:39.870720001 -0600
@@ -136,14 +136,11 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 61f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
movl $SYS_futex, %eax
syscall
movl $1, %r8d
- cmpq $-EAGAIN, %rax
- je 91f
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
@@ -331,69 +328,6 @@ __pthread_cond_wait:
13: movq %r10, %rax
jmp 14b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
- movq 8(%rsp), %rdi
-
- /* Get internal lock. */
- movl $1, %esi
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %esi, (%rdi)
-#else
- cmpxchgl %esi, cond_lock(%rdi)
-#endif
- jz 92f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- callq __lll_lock_wait
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- incl cond_futex(%rdi)
- movl cond_futex(%rdi), %edx
-
- /* Release internal lock. */
- LOCK
-#if cond_lock == 0
- decl (%rdi)
-#else
- decl cond_lock(%rdi)
-#endif
- jz 93f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- /* The call preserves %rdx. */
- callq __lll_unlock_wake
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorq %r10, %r10
- mov dep_mutex(%rdi), %R8_LP
- leaq cond_futex(%rdi), %rdi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -546,15 +480,11 @@ __condvar_cleanup1:
.uleb128 .LcleanupSTART-.LSTARTCODE
.uleb128 .LcleanupEND-.LcleanupSTART
.uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
- .uleb128 .LcleanupSTART2-.LSTARTCODE
- .uleb128 .LcleanupEND2-.LcleanupSTART2
- .uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
+ .uleb128 0
.uleb128 .LcallUR-.LSTARTCODE
.uleb128 .LENDCODE-.LcallUR
.uleb128 0
- .uleb128 0
+ .uleb128 0
.Lcstend:

22
glibc-rh770439.patch Normal file
View file

@ -0,0 +1,22 @@
2012-02-08 Rakesh Pandit <rakesh@fedoraproject.org>
* locales/ks_IN@devanagari: Fix week day names.
--- a/localedata/locales/ks_IN@devanagari
+++ a/localedata/locales/ks_IN@devanagari
@@ -64,11 +64,11 @@ abday "<U0906><U0925><U094D>";/
"<U092C><U091F>"
%
% Full weekday names (%A)
-day "<U0906><U0925><U094D><U094D><U0935><U093E><U0930><U094D>";/
+day "<U0906><U0925><U094D><U0935><U093E><U0930><U094D>";/
"<U091A><U0928><U094D><U0926><U094D><U0930><U0935><U093E><U0930><U094D>";/
- "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094B><U0918><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094D><U0930><U0938><U094D><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U0918><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094D><U0930><U0938><U094D><U0935><U093E><U0930><U094D>";/
"<U091C><U0941><U092E><U093E><U0939><U094D>";/
"<U092C><U091F><U0935><U093E><U0930><U094D>"
%

23
glibc-rh770869.patch Normal file
View file

@ -0,0 +1,23 @@
diff -rup a/fedora/nscd.service b/fedora/nscd.service
--- a/fedora/nscd.service 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/nscd.service 2012-02-03 13:40:37.070063851 -0700
@@ -3,16 +3,15 @@ Description=Name Service Cache Daemon
After=syslog.target
[Service]
-Type=forking
EnvironmentFile=-/etc/sysconfig/nscd
-ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
+ExecStart=/usr/sbin/nscd --foreground $NSCD_OPTIONS
ExecStop=/usr/sbin/nscd --shutdown
ExecReload=/usr/sbin/nscd -i passwd
ExecReload=/usr/sbin/nscd -i group
ExecReload=/usr/sbin/nscd -i hosts
-ExecReload=/usr/sbin/nscd -i service
+ExecReload=/usr/sbin/nscd -i services
+ExecReload=/usr/sbin/nscd -i netgroup
Restart=always
-PIDFile=/run/nscd/nscd.pid
[Install]
WantedBy=multi-user.target

12
glibc-rh787201.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/fedora/glibc.spec.in b/fedora/glibc.spec.in
--- a/fedora/glibc.spec.in 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc.spec.in 2012-02-03 09:26:36.669828253 -0700
@@ -316,7 +316,7 @@ GCC="gcc -m64"
GXX="g++ -m64"
%endif
%ifarch ppc64
-BuildFlags="-mno-minimal-toc"
+BuildFlags=
GCC="gcc -m64"
GXX="g++ -m64"
%endif

159
glibc-rh788989-2.patch Normal file
View file

@ -0,0 +1,159 @@
2012-04-12 Jeff Law <law@redhat.com>
* nscd/grpcache.c (cache_addgr): Track alloca usage with alloca_account.
Do not allocate DATASET on the stack if it's too large. Free DATASET
if needed.
diff -rcp a/nscd/grpcache.c b/nscd/grpcache.c
*** a/nscd/grpcache.c Wed Apr 11 12:50:07 2012
--- b/nscd/grpcache.c Wed Apr 11 21:45:58 2012
*************** cache_addgr (struct database_dyn *db, in
*** 178,184 ****
char *cp;
const size_t key_len = strlen (key);
const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1;
! char *buf = alloca (buf_len);
ssize_t n;
size_t cnt;
--- 178,185 ----
char *cp;
const size_t key_len = strlen (key);
const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1;
! size_t alloca_used = 0;
! char *buf = alloca_account (buf_len, alloca_used);
ssize_t n;
size_t cnt;
*************** cache_addgr (struct database_dyn *db, in
*** 190,196 ****
/* Determine the length of all members. */
while (grp->gr_mem[gr_mem_cnt])
++gr_mem_cnt;
! gr_mem_len = (uint32_t *) alloca (gr_mem_cnt * sizeof (uint32_t));
for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt)
{
gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1;
--- 191,198 ----
/* Determine the length of all members. */
while (grp->gr_mem[gr_mem_cnt])
++gr_mem_cnt;
! gr_mem_len = (uint32_t *) alloca_account (gr_mem_cnt * sizeof (uint32_t),
! alloca_used);
for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt)
{
gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1;
*************** cache_addgr (struct database_dyn *db, in
*** 205,214 ****
change. Allocate memory on the cache since it is likely
discarded anyway. If it turns out to be necessary to have a
new record we can still allocate real memory. */
! bool alloca_used = false;
dataset = NULL;
! if (he == NULL)
dataset = (struct dataset *) mempool_alloc (db, total + n, 1);
if (dataset == NULL)
--- 207,216 ----
change. Allocate memory on the cache since it is likely
discarded anyway. If it turns out to be necessary to have a
new record we can still allocate real memory. */
! bool dataset_in_stack_or_freed = false;
dataset = NULL;
! if (he == NULL || ! __libc_use_alloca (alloca_used + total + n))
dataset = (struct dataset *) mempool_alloc (db, total + n, 1);
if (dataset == NULL)
*************** cache_addgr (struct database_dyn *db, in
*** 216,225 ****
/* We cannot permanently add the result in the moment. But
we can provide the result as is. Store the data in some
temporary memory. */
! dataset = (struct dataset *) alloca (total + n);
/* We cannot add this record to the permanent database. */
! alloca_used = true;
}
dataset->head.allocsize = total + n;
--- 218,227 ----
/* We cannot permanently add the result in the moment. But
we can provide the result as is. Store the data in some
temporary memory. */
! dataset = (struct dataset *) alloca_account (total + n, alloca_used);
/* We cannot add this record to the permanent database. */
! dataset_in_stack_or_freed = true;
}
dataset->head.allocsize = total + n;
*************** cache_addgr (struct database_dyn *db, in
*** 273,278 ****
--- 275,288 ----
allocated on the stack and need not be freed. */
dh->timeout = dataset->head.timeout;
++dh->nreloads;
+
+ /* If the new record was not allocated on the stack, then it must
+ be freed. Note that it can no longer be used. */
+ if (! dataset_in_stack_or_freed)
+ {
+ free (dataset);
+ dataset_in_stack_or_freed = true;
+ }
}
else
{
*************** cache_addgr (struct database_dyn *db, in
*** 288,294 ****
key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + n);
! alloca_used = false;
}
/* Mark the old record as obsolete. */
--- 298,304 ----
key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + n);
! dataset_in_stack_or_freed = false;
}
/* Mark the old record as obsolete. */
*************** cache_addgr (struct database_dyn *db, in
*** 303,309 ****
assert (fd != -1);
#ifdef HAVE_SENDFILE
! if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
{
assert (db->wr_fd != -1);
assert ((char *) &dataset->resp > (char *) db->data);
--- 313,319 ----
assert (fd != -1);
#ifdef HAVE_SENDFILE
! if (__builtin_expect (db->mmap_used, 1) && !dataset_in_stack_or_freed)
{
assert (db->wr_fd != -1);
assert ((char *) &dataset->resp > (char *) db->data);
*************** cache_addgr (struct database_dyn *db, in
*** 330,336 ****
/* Add the record to the database. But only if it has not been
stored on the stack. */
! if (! alloca_used)
{
/* If necessary, we also propagate the data to disk. */
if (db->persistent)
--- 340,346 ----
/* Add the record to the database. But only if it has not been
stored on the stack. */
! if (! dataset_in_stack_or_freed)
{
/* If necessary, we also propagate the data to disk. */
if (db->persistent)

12
glibc-rh789209.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/localedata/locales/uk_UA b/localedata/locales/uk_UA
--- a/localedata/locales/uk_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/uk_UA 2012-02-09 22:32:36.864134146 -0700
@@ -700,7 +700,7 @@ LC_MONETARY
% 200 hrv. - 200 hryven (money)
% the local currency symbol
-currency_symbol "<U0433><U0440>" % hr (hryvnya)
+currency_symbol "<U0433><U0440><U043D><U002E>" % hr (hryvnya)
% This must be a 4-character string containing the international currency
% symbol as defined by the ISO 4217 standard (three characters) followed

111
glibc-rh789238-2.patch Normal file
View file

@ -0,0 +1,111 @@
diff -rup c/malloc/arena.c d/malloc/arena.c
--- c/malloc/arena.c 2012-04-02 21:21:08.842818529 -0600
+++ d/malloc/arena.c 2012-04-02 21:22:25.943306724 -0600
@@ -121,14 +121,14 @@ int __malloc_initialized = -1;
if(ptr) \
(void)mutex_lock(&ptr->mutex); \
else \
- ptr = arena_get2(ptr, (size)); \
+ ptr = arena_get2(ptr, (size), false); \
} while(0)
#else
# define arena_lock(ptr, size) do { \
if(ptr && !mutex_trylock(&ptr->mutex)) { \
THREAD_STAT(++(ptr->stat_lock_direct)); \
} else \
- ptr = arena_get2(ptr, (size)); \
+ ptr = arena_get2(ptr, (size), false); \
} while(0)
#endif
@@ -782,7 +782,7 @@ get_free_list (void)
static mstate
-reused_arena (void)
+reused_arena (bool retrying)
{
mstate result;
static mstate next_to_use;
@@ -799,6 +799,15 @@ reused_arena (void)
}
while (result != next_to_use);
+ /* If we are retrying due to a failure to allocate in the main
+ arena, don't wait for the main arena to become available, select
+ another.
+
+ To really fix this right we would have to try the allocation
+ in every other arena, but that seems like severe overkill. */
+ if (retrying && result == &main_arena)
+ result = result->next;
+
/* No arena available. Wait for the next in line. */
(void)mutex_lock(&result->mutex);
@@ -813,7 +822,7 @@ reused_arena (void)
static mstate
internal_function
-arena_get2(mstate a_tsd, size_t size)
+arena_get2(mstate a_tsd, size_t size, bool retrying)
{
mstate a;
@@ -858,7 +867,7 @@ arena_get2(mstate a_tsd, size_t size)
catomic_decrement (&narenas);
}
else
- a = reused_arena ();
+ a = reused_arena (retrying);
}
#else
if(!a_tsd)
diff -rup c/malloc/malloc.c d/malloc/malloc.c
--- c/malloc/malloc.c 2012-04-02 21:21:08.984817776 -0600
+++ d/malloc/malloc.c 2012-04-02 21:21:39.533655779 -0600
@@ -2938,7 +2938,7 @@ public_mALLOc(size_t bytes)
/* ... or sbrk() has failed and there is still a chance to mmap() */
mstate prev = ar_ptr->next ? ar_ptr : 0;
(void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes);
+ ar_ptr = arena_get2(prev, bytes, true);
if(ar_ptr) {
victim = _int_malloc(ar_ptr, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3117,7 +3117,7 @@ public_mEMALIGn(size_t alignment, size_t
/* ... or sbrk() has failed and there is still a chance to mmap() */
mstate prev = ar_ptr->next ? ar_ptr : 0;
(void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes);
+ ar_ptr = arena_get2(prev, bytes, true);
if(ar_ptr) {
p = _int_memalign(ar_ptr, alignment, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3164,7 +3164,7 @@ public_vALLOc(size_t bytes)
/* ... or sbrk() has failed and there is still a chance to mmap() */
mstate prev = ar_ptr->next ? ar_ptr : 0;
(void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes);
+ ar_ptr = arena_get2(prev, bytes, true);
if(ar_ptr) {
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3211,7 +3211,7 @@ public_pVALLOc(size_t bytes)
/* ... or sbrk() has failed and there is still a chance to mmap() */
mstate prev = ar_ptr->next ? ar_ptr : 0;
(void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE);
+ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE, true);
if(ar_ptr) {
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3298,7 +3298,7 @@ public_cALLOc(size_t n, size_t elem_size
/* ... or sbrk() has failed and there is still a chance to mmap() */
mstate prev = av->next ? av : 0;
(void)mutex_unlock(&av->mutex);
- av = arena_get2(prev, sz);
+ av = arena_get2(prev, sz, true);
if(av) {
mem = _int_malloc(av, sz);
(void)mutex_unlock(&av->mutex);

115
glibc-rh789238.patch Normal file
View file

@ -0,0 +1,115 @@
Only in b/malloc: arena.c.orig
Only in b/malloc: hooks.c.orig
diff -rup a/malloc/malloc.c b/malloc/malloc.c
--- a/malloc/malloc.c 2012-02-14 10:08:22.062534892 -0700
+++ b/malloc/malloc.c 2012-02-14 10:19:43.088724473 -0700
@@ -2936,8 +2936,9 @@ public_mALLOc(size_t bytes)
(void)mutex_unlock(&ar_ptr->mutex);
} else {
/* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
- (void)mutex_unlock(&main_arena.mutex);
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes);
if(ar_ptr) {
victim = _int_malloc(ar_ptr, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3151,23 +3152,26 @@ public_vALLOc(size_t bytes)
if(!ar_ptr)
return 0;
p = _int_valloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
if(!p) {
/* Maybe the failure is due to running out of mmapped areas. */
if(ar_ptr != &main_arena) {
+ (void)mutex_unlock(&ar_ptr->mutex);
ar_ptr = &main_arena;
(void)mutex_lock(&ar_ptr->mutex);
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
} else {
/* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes);
if(ar_ptr) {
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
}
}
- }
+ } else
+ (void)mutex_unlock(&ar_ptr->mutex);
assert(!p || chunk_is_mmapped(mem2chunk(p)) ||
ar_ptr == arena_for_chunk(mem2chunk(p)));
@@ -3195,24 +3199,26 @@ public_pVALLOc(size_t bytes)
arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE);
p = _int_pvalloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
if(!p) {
/* Maybe the failure is due to running out of mmapped areas. */
if(ar_ptr != &main_arena) {
+ (void)mutex_unlock(&ar_ptr->mutex);
ar_ptr = &main_arena;
(void)mutex_lock(&ar_ptr->mutex);
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
} else {
/* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0,
- bytes + 2*pagesz + MINSIZE);
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE);
if(ar_ptr) {
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
}
}
- }
+ } else
+ (void)mutex_unlock(&ar_ptr->mutex);
assert(!p || chunk_is_mmapped(mem2chunk(p)) ||
ar_ptr == arena_for_chunk(mem2chunk(p)));
@@ -3277,8 +3283,6 @@ public_cALLOc(size_t n, size_t elem_size
#endif
mem = _int_malloc(av, sz);
- /* Only clearing follows, so we can unlock early. */
- (void)mutex_unlock(&av->mutex);
assert(!mem || chunk_is_mmapped(mem2chunk(mem)) ||
av == arena_for_chunk(mem2chunk(mem)));
@@ -3286,21 +3290,23 @@ public_cALLOc(size_t n, size_t elem_size
if (mem == 0) {
/* Maybe the failure is due to running out of mmapped areas. */
if(av != &main_arena) {
+ (void)mutex_unlock(&av->mutex);
(void)mutex_lock(&main_arena.mutex);
mem = _int_malloc(&main_arena, sz);
(void)mutex_unlock(&main_arena.mutex);
} else {
/* ... or sbrk() has failed and there is still a chance to mmap() */
- (void)mutex_lock(&main_arena.mutex);
- av = arena_get2(av->next ? av : 0, sz);
- (void)mutex_unlock(&main_arena.mutex);
+ mstate prev = av->next ? av : 0;
+ (void)mutex_unlock(&av->mutex);
+ av = arena_get2(prev, sz);
if(av) {
mem = _int_malloc(av, sz);
(void)mutex_unlock(&av->mutex);
}
}
if (mem == 0) return 0;
- }
+ } else
+ (void)mutex_unlock(&av->mutex);
p = mem2chunk(mem);
/* Two optional cases in which clearing not necessary */

188
glibc-rh790292.patch Normal file
View file

@ -0,0 +1,188 @@
diff -Nrup a/localedata/locales/sat_IN b/localedata/locales/sat_IN
--- a/localedata/locales/sat_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/sat_IN 2012-02-14 09:45:55.072442697 -0700
@@ -0,0 +1,184 @@
+comment_char %
+escape_char /
+% Santali language locale for India.
+% Contributed by Mr. Pravin Satpute <psatpute AT redhat DOT com> and Mr. Thakur Prasad Murmu <tp_murmu AT yahoo DOT com>
+
+LC_IDENTIFICATION
+title "Santali language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Santali"
+territory "India"
+revision "1.0"
+date "2012-01-17"
+%
+category "sat_IN:2012";LC_IDENTIFICATION
+category "sat_IN:2012";LC_CTYPE
+category "sat_IN:2012";LC_COLLATE
+category "sat_IN:2012";LC_TIME
+category "sat_IN:2012";LC_NUMERIC
+category "sat_IN:2012";LC_MONETARY
+category "sat_IN:2012";LC_MESSAGES
+category "sat_IN:2012";LC_PAPER
+category "sat_IN:2012";LC_NAME
+category "sat_IN:2012";LC_ADDRESS
+category "sat_IN:2012";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
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U0938><U093F><U0902><U0917><U0947>";"<U0913><U0924><U0947>";/
+ "<U092C><U093E><U0932><U0947>";"<U0938><U093E><U0917><U0941><U0928>";/
+ "<U0938><U093E><U0930><U0926><U0940>";/
+ "<U091C><U093E><U0930><U0941><U092E>";"<U091E><U0941><U0939><U0941><U092E>"
+%
+
+% Full weekday names (%A)
+day "<U0938><U093F><U0902><U0917><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0913><U0924><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U092C><U093E><U0932><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0938><U093E><U0917><U0941><U0928><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0938><U093E><U0930><U0926><U0940><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U091C><U093E><U0930><U0941><U092E><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U091E><U0941><U0939><U0941><U092E><U092E><U093E><U0901><U0939><U093E><U0901>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0947><U0932>";/
+ "<U092E><U0908>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"
+%
+
+% Full month names (%B)
+mon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0947><U0932>";/
+ "<U092E><U0908>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"
+%
+% Equivalent of AM PM
+
+am_pm "<U0041><U004D>";"<U0050><U004D>"
+
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+
+LC_MESSAGES
+% This is the POSIX Locale definition for the LC_MESSAGES category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% ^(Yes|[yY])
+yesexpr "<U005E><U0028><U0939><U094B><U092F><U007C><U005B><U0079>/
+<U0059><U005D><U0029>"
+%
+% ^(No|[nN])
+noexpr "<U005E><U0028><U092C><U093E><U0919><U007C><U005B><U006E><U004E>/
+<U005D><U0029>"
+%
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U092E><U093E><U0928>"
+name_mrs "<U092E><U093E><U0928><U0940>"
+name_miss "<U092E><U093E><U0908>"
+name_ms ""
+
+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

176
glibc-rh790298.patch Normal file
View file

@ -0,0 +1,176 @@
diff -Nrup a/localedata/locales/mni_IN b/localedata/locales/mni_IN
--- a/localedata/locales/mni_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/mni_IN 2012-02-14 09:49:33.059129964 -0700
@@ -0,0 +1,172 @@
+comment_char %
+escape_char /
+% Manipuri language locale for India.
+% Contributed by Mr. Pravin Satpute <psatpute AT redhat DOT com> and Ms. Rebika Devi < rebika_srd AT rediffmail DOT com>
+
+LC_IDENTIFICATION
+title "Manipuri language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Manipuri"
+territory "India"
+revision "1.0"
+date "2012-01-17"
+%
+category "mni_IN:2012";LC_IDENTIFICATION
+category "mni_IN:2012";LC_CTYPE
+category "mni_IN:2012";LC_COLLATE
+category "mni_IN:2012";LC_TIME
+category "mni_IN:2012";LC_NUMERIC
+category "mni_IN:2012";LC_MONETARY
+category "mni_IN:2012";LC_MESSAGES
+category "mni_IN:2012";LC_PAPER
+category "mni_IN:2012";LC_NAME
+category "mni_IN:2012";LC_ADDRESS
+category "mni_IN:2012";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "bn_IN"
+END LC_CTYPE
+
+LC_COLLATE
+copy "bn_IN"
+END LC_COLLATE
+
+LC_MONETARY
+copy "bn_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "bn_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U09A8><U09CB><U0982>";"<U09A8><U09BF><U0982>";/
+ "<U09B2><U09C8><U09AC><U09BE><U0995>";"<U09DF><U09C1><U09AE>";/
+ "<U09B6><U0997><U09CB><U09B2>";/
+ "<U0987><U09B0><U09BE>";"<U09A5><U09BE><U0982>"
+%
+
+% Full weekday names (%A)
+day "<U09A8><U09CB><U0982><U09AE><U09BE><U0987><U099C><U09BF><U0982>";/
+ "<U09A8><U09BF><U0982><U09A5><U09CC><U0995><U09BE><U09AC><U09BE>";/
+ "<U09B2><U09C8><U09AC><U09BE><U0995><U09AA><U09CB><U0995><U09AA><U09BE>";/
+ "<U09DF><U09C1><U09AE><U09B6><U0995><U09C8><U09B6><U09BE>";/
+ "<U09B6><U0997><U09CB><U09B2><U09B6><U09C7><U09A8>";/
+ "<U0987><U09B0><U09BE><U0987>";/
+ "<U09A5><U09BE><U0982><U099C>"
+%
+% Abbreviated month names (%b)
+abmon "<U099C><U09BE><U09A8>";/
+ "<U09AB><U09C7><U09AC>";/
+ "<U09AE><U09BE><U09B0>";/
+ "<U098F><U09AA><U09CD><U09B0><U09BF>";/
+ "<U09AE><U09C7>";/
+ "<U099C><U09C1><U09A8>";/
+ "<U099C><U09C1><U09B2>";/
+ "<U0986><U0997>";/
+ "<U09B8><U09C7><U09AA>";/
+ "<U0993><U0995><U09CD><U09A4>";/
+ "<U09A8><U09AC><U09C7>";/
+ "<U09A1><U09BF><U09B8>"
+%
+
+% Full month names (%B)
+mon "<U099C><U09BE><U09A8><U09C1><U09F1><U09BE><U09B0><U09BF>";/
+ "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09F1><U09BE><U09B0><U09BF>";/
+ "<U09AE><U09BE><U09B0><U09CD><U099A>";/
+ "<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/
+ "<U09AE><U09C7>";/
+ "<U099C><U09C1><U09A8>";/
+ "<U099C><U09C1><U09B2><U09BE><U0987>";/
+ "<U0986><U0997><U09B7><U09CD><U099F>";/
+ "<U09B8><U09C7><U09AA><U09CD><U09A4><U09C7><U09AE><U09CD><U09AC><U09B0>";/
+ "<U0993><U0995><U09CD><U09A4><U09CB><U09AC><U09B0>";/
+ "<U09A8><U09AC><U09C7><U09AE><U09CD><U09AC><U09B0>";/
+ "<U09A1><U09BF><U09B8><U09C7><U09AE><U09CD><U09AC><U09B0>"
+%
+% Equivalent of AM PM
+
+am_pm "<U098F><U002E><U09AE><U002E>";/
+ "<U09AA><U002E><U09AE><U002E>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+
+LC_MESSAGES
+copy "en_IN"
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "bn_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U09B6><U09CD><U09B0><U09C0>"
+name_mrs "<U09B6><U09CD><U09B0><U09C0><U09AE><U09A4><U09BF>"
+name_miss "<U0995><U09C1><U09AE><U09BE><U09B0><U09C0>"
+name_ms "<U0995><U09C1><U09AE><U09BE><U09B0>"
+
+END LC_NAME
+
+
+LC_ADDRESS
+copy "bn_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "bn_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "bn_IN"
+END LC_MEASUREMENT

180
glibc-rh791161.patch Normal file
View file

@ -0,0 +1,180 @@
diff -Nrup a/localedata/locales/doi_IN b/localedata/locales/doi_IN
--- a/localedata/locales/doi_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/doi_IN 2012-02-16 09:14:08.215572109 -0700
@@ -0,0 +1,176 @@
+comment_char %
+escape_char /
+% Dogri language locale for India.
+% Contributed by Pravin Satpute <psatpute@redhat.com> and Sushil Badyal <badyalsk@gmail.com>
+
+LC_IDENTIFICATION
+title "Dogri language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Dogri"
+territory "India"
+revision "1.0"
+date "2012-02-16"
+%
+category "doi_IN:2012";LC_IDENTIFICATION
+category "doi_IN:2012";LC_CTYPE
+category "doi_IN:2012";LC_COLLATE
+category "doi_IN:2012";LC_TIME
+category "doi_IN:2012";LC_NUMERIC
+category "doi_IN:2012";LC_MONETARY
+category "doi_IN:2012";LC_MESSAGES
+category "doi_IN:2012";LC_PAPER
+category "doi_IN:2012";LC_NAME
+category "doi_IN:2012";LC_ADDRESS
+category "doi_IN:2012";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "hi_IN"
+END LC_CTYPE
+
+LC_COLLATE
+
+% Copy the template from ISO/IEC 14651
+copy "iso14651_t1"
+
+END LC_COLLATE
+
+LC_MONETARY
+copy "hi_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode/Java
+%
+% Abbreviated weekday names (%a)
+abday "<U0910><U0924><U0020>";/
+ "<U0938><U094B><U092E><U0020>";/
+ "<U092E><U0902><U0917><U0932><U0020>";/
+ "<U092C><U0941><U0927><U0020>";/
+ "<U092C><U0940><U0930><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0915><U0930><U0020>";/
+ "<U0936><U094D><U0928><U0940><U091A><U0930><U0020>"
+%
+% Full weekday names (%A)
+day "<U0910><U0924><U092C><U093E><U0930><U0020>";/
+ "<U0938><U094B><U092E><U092C><U093E><U0930><U0020>";/
+ "<U092E><U0902><U0917><U0932><U092C><U0930><U0020>";/
+ "<U092C><U0941><U0927><U092C><U093E><U0930><U0020>";/
+ "<U092C><U0940><U0930><U092C><U093E><U0930><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0915><U0930><U092C><U093E><U0930><U0020>";/
+ "<U0936><U094D><U0928><U0940><U091A><U0930><U092C><U093E><U0930><U0020>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U090F><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0947><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0942><U0932><U0948>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U0902><U092C><U0930>";/
+ "<U0905><U0915><U094D><U0924><U0942><U092C><U0930>";/
+ "<U0928><U0935><U0902><U092C><U0930>";/
+ "<U0926><U093F><U0938><U0902><U092C><U0930>"
+%
+% Full month names (%B)
+mon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U090F><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0947><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0942><U0932><U0948>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U0902><U092C><U0930>";/
+ "<U0905><U0915><U094D><U0924><U0942><U092C><U0930>";/
+ "<U0928><U0935><U0902><U092C><U0930>";/
+ "<U0926><U093F><U0938><U0902><U092C><U0930>"
+%
+% Equivalent of AM PM
+am_pm "<U0938><U091E><U0902>";/
+ "<U0938><U092C><U0947><U0930>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+
+LC_MESSAGES
+% ^(Yes|[yY])
+yesexpr "<U005E><U0028><U0911><U0939><U007C><U005B><U0079>/
+<U0059><U005D><U0029>"
+%
+% ^(No|[nN])
+noexpr "<U005E><U0028><U0928><U093E><U007C><U005B><U006E><U004E>/
+<U005D><U0029>"
+%
+END LC_MESSAGES
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the
+% LC_NAME category.
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U004D><U0072><U002E>"
+name_mrs "<U004D><U0072><U0073><U002E>"
+name_miss "<U004D><U0069><U0073><U0073><U002E>"
+name_ms "<U004D><U0073><U002E>"
+
+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

78
glibc-rh800224.patch Normal file
View file

@ -0,0 +1,78 @@
2012-03-07 Jeff Law <law@redhat.com>
* elf/dl-reloc.c (_dl_relocate_object): Move code to allocate
l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE.
diff -rup a/elf/dl-reloc.c b/elf/dl-reloc.c
--- a/elf/dl-reloc.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-reloc.c 2012-03-06 15:41:56.486242640 -0700
@@ -238,32 +238,9 @@ _dl_relocate_object (struct link_map *l,
/* String table object symbols. */
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
-#define RESOLVE_MAP(ref, version, r_type) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
- ? (bump_num_cache_relocations (), \
- (*ref) = l->l_lookup_cache.ret, \
- l->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- l->l_lookup_cache.type_class = _tc; \
- l->l_lookup_cache.sym = (*ref); \
- const struct r_found_version *v = NULL; \
- if ((version) != NULL && (version)->hash != 0) \
- v = (version); \
- _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
- scope, v, _tc, \
- DL_LOOKUP_ADD_DEPENDENCY, NULL); \
- l->l_lookup_cache.ret = (*ref); \
- l->l_lookup_cache.value = _lr; })) \
- : l)
-
-#include "dynamic-link.h"
-
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
-
+ /* ELF_DYNAMIC_RELOCATE may need to examine l_reloc_result
+ when handling MACHINE_IRELATIVE relocs. So we must
+ allocate l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. */
#ifndef PROF
if (__builtin_expect (consider_profiling, 0))
{
@@ -290,6 +267,32 @@ _dl_relocate_object (struct link_map *l,
}
}
#endif
+
+ /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
+#define RESOLVE_MAP(ref, version, r_type) \
+ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
+ ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
+ && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
+ ? (bump_num_cache_relocations (), \
+ (*ref) = l->l_lookup_cache.ret, \
+ l->l_lookup_cache.value) \
+ : ({ lookup_t _lr; \
+ int _tc = elf_machine_type_class (r_type); \
+ l->l_lookup_cache.type_class = _tc; \
+ l->l_lookup_cache.sym = (*ref); \
+ const struct r_found_version *v = NULL; \
+ if ((version) != NULL && (version)->hash != 0) \
+ v = (version); \
+ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
+ scope, v, _tc, \
+ DL_LOOKUP_ADD_DEPENDENCY, NULL); \
+ l->l_lookup_cache.ret = (*ref); \
+ l->l_lookup_cache.value = _lr; })) \
+ : l)
+
+#include "dynamic-link.h"
+
+ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
}
/* Mark the object so we know this work has been done. */

27
glibc-rh803286.patch Normal file
View file

@ -0,0 +1,27 @@
diff -rup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-03-12 14:11:04.134056609 -0600
+++ b/localedata/SUPPORTED 2012-03-14 20:59:39.993269235 -0600
@@ -103,6 +103,7 @@ de_DE@euro/ISO-8859-15 \
de_LU.UTF-8/UTF-8 \
de_LU/ISO-8859-1 \
de_LU@euro/ISO-8859-15 \
+doi_IN/UTF-8 \
dv_MV/UTF-8 \
dz_BT/UTF-8 \
el_GR.UTF-8/UTF-8 \
@@ -298,6 +299,7 @@ mk_MK.UTF-8/UTF-8 \
mk_MK/ISO-8859-5 \
ml_IN/UTF-8 \
mn_MN/UTF-8 \
+mni_IN/UTF-8 \
mr_IN/UTF-8 \
ms_MY.UTF-8/UTF-8 \
ms_MY/ISO-8859-1 \
@@ -350,6 +352,7 @@ ru_UA.UTF-8/UTF-8 \
ru_UA/KOI8-U \
rw_RW/UTF-8 \
sa_IN/UTF-8 \
+sat_IN/UTF-8 \
sc_IT/UTF-8 \
sd_IN/UTF-8 \
sd_IN@devanagari/UTF-8 \

23
glibc-rh804630.patch Normal file
View file

@ -0,0 +1,23 @@
diff -rup c/resolv/res_send.c d/resolv/res_send.c
--- c/resolv/res_send.c 2012-01-01 05:16:32.000000000 -0700
+++ d/resolv/res_send.c 2012-03-30 12:39:30.862467628 -0600
@@ -409,6 +409,7 @@ __libc_res_nsend(res_state statp, const
*/
if (EXT(statp).nsinit == 0) {
unsigned char map[MAXNS];
+ unsigned int ext_total_nscount;
memset (map, MAXNS, sizeof (map));
for (n = 0; n < MAXNS; n++) {
@@ -422,8 +423,9 @@ __libc_res_nsend(res_state statp, const
}
}
n = statp->nscount;
- if (statp->nscount > EXT(statp).nscount)
- for (n = EXT(statp).nscount, ns = 0;
+ ext_total_nscount = EXT(statp).nscount + EXT(statp).nscount6;
+ if (statp->nscount > ext_total_nscount)
+ for (n = ext_total_nscount, ns = 0;
n < statp->nscount; n++) {
while (ns < MAXNS
&& EXT(statp).nsmap[ns] != MAXNS)

78
glibc-rh819430.patch Normal file
View file

@ -0,0 +1,78 @@
diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
# if HANDLE_MULTIBYTE
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
{
+ const char *orig_pattern = pattern;
mbstate_t ps;
size_t n;
const char *p;
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /* Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
prepare_wpattern:
n = mbsrtowcs (NULL, &pattern, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /*Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
__set_errno (ENOMEM);
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- {
- /* Something wrong.
- XXX Do we have to set `errno' to something which
- mbsrtows hasn't already done? */
- free_return:
- free (wpattern_malloc);
- return -1;
- }
+ /* Something wrong: Fall back to single byte matching. */
+ goto free_and_try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
prepare_wstring:
n = mbsrtowcs (NULL, &string, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- goto free_return;
+ /* Something wrong: Fall back to singlebyte matching. */
+ goto free_and_try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
free (wpattern_malloc);
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
free (wpattern_malloc);
return res;
+ free_and_try_singlebyte:
+ free(wpattern_malloc);
+ try_singlebyte:
+ pattern = orig_pattern;
}
# endif /* mbstate_t and mbsrtowcs or _LIBC. */

13
glibc-rh825061.patch Normal file
View file

@ -0,0 +1,13 @@
diff -rup a/manual/Makefile b/manual/Makefile
--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600
+++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600
@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c
mv -f $@.new $@
$(objpfx)%.info: %.texinfo
- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
+ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $<
+ mv `basename $@`* $(objpfx)
$(objpfx)%.dvi: %.texinfo
cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(<D) && pwd) --output=$@ \

27
glibc-rh827510.patch Normal file
View file

@ -0,0 +1,27 @@
2012-06-14 Jeff Law <law@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Delay setting
file->decided until we have successfully loaded the file's
data.
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index e3fa187..9fd9216 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
int save_err;
int alloc = ld_mapped;
- file->decided = 1;
file->data = NULL;
fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
newdata->alloc = alloc;
file->data = newdata;
+ file->decided = 1;
}
void

72
glibc-stap-libm.patch Normal file
View file

@ -0,0 +1,72 @@
diff -rup c/sysdeps/ieee754/dbl-64/slowexp.c d/sysdeps/ieee754/dbl-64/slowexp.c
--- c/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-20 19:47:38.000000000 -0600
+++ d/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-21 10:02:51.693957300 -0600
@@ -30,6 +30,8 @@
#include "mpa.h"
#include <math_private.h>
+#include <stap-probe.h>
+
#ifndef SECTION
# define SECTION
#endif
@@ -60,12 +62,21 @@ __slowexp(double x) {
__sub(&mpy,&mpcor,&mpz,p);
__mp_dbl(&mpw, &w, p);
__mp_dbl(&mpz, &z, p);
- if (w == z) return w;
+ if (w == z) {
+ /* Track how often we get to the slow exp code plus
+ its input/output values. */
+ LIBC_PROBE (slowexp_p6, 2, &x, &w);
+ return w;
+ }
else { /* if calculating is not exactly */
p = 32;
__dbl_mp(x,&mpx,p);
__mpexp(&mpx, &mpy, p);
__mp_dbl(&mpy, &res, p);
+
+ /* Track how often we get to the uber-slow exp code plus
+ its input/output values. */
+ LIBC_PROBE (slowexp_p32, 2, &x, &res);
return res;
}
}
diff -rup c/sysdeps/ieee754/dbl-64/slowpow.c d/sysdeps/ieee754/dbl-64/slowpow.c
--- c/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-20 19:47:38.000000000 -0600
+++ d/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-21 10:02:51.694957291 -0600
@@ -34,6 +34,8 @@
#include "mpa.h"
#include <math_private.h>
+#include <stap-probe.h>
+
#ifndef SECTION
# define SECTION
#endif
@@ -65,7 +67,12 @@ __slowpow(double x, double y, double z)
__mp_dbl(&mpr, &res, p);
__sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */
__mp_dbl(&mpr1, &res1, p); /* converting into double precision */
- if (res == res1) return res;
+ if (res == res1) {
+ /* Track how often we get to the slow pow code plus
+ its input/output values. */
+ LIBC_PROBE (slowpow_p6, 4, &x, &y, &z, &res);
+ return res;
+ }
p = 32; /* if we get here result wasn't calculated exactly, continue */
__dbl_mp(x,&mpx,p); /* for more exact calculation */
@@ -75,5 +82,10 @@ __slowpow(double x, double y, double z)
__mul(&mpy,&mpz,&mpw,p); /* y*z =w */
__mpexp(&mpw, &mpp, p); /* e^w=pp */
__mp_dbl(&mpp, &res, p); /* converting into double precision */
+
+ /* Track how often we get to the uber-slow pow code plus
+ its input/output values. */
+ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res);
+
return res;
}

12
glibc-stap.patch Normal file
View file

@ -0,0 +1,12 @@
diff -Nrup c/scripts/check-local-headers.sh d/scripts/check-local-headers.sh
--- c/scripts/check-local-headers.sh 2012-05-20 19:47:38.000000000 -0600
+++ d/scripts/check-local-headers.sh 2012-05-20 23:54:51.258670072 -0600
@@ -28,7 +28,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

3050
glibc.spec

File diff suppressed because it is too large Load diff

1116
glibc.spec~ Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,27 +0,0 @@
Description: unset CALL_MCOUNT for __libc_do_syscall
unset CALL_MCOUNT before __libc_do_syscall, because it only supports Thumb-2
and ARM mode, not Thumb-1; and because profiling this internal routine
is of dubious value.
Origin: https://bugs.launchpad.net/linaro-toolchain-misc/+bug/605030/+attachment/1484534/+files/libc-do-syscall.S
Author: Peter Pearse <peter.pearse@linaro.org>
Bug-Linaro: https://bugs.launchpad.net/linaro-toolchain-misc/+bug/605030
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/605030
Reviewed-by: Steve Langasek <steve.langasek@linaro.org>
Index: glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
===================================================================
--- glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
+++ glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
@@ -29,6 +29,12 @@
.syntax unified
.hidden __libc_do_syscall
+/*
+ * PMP Work round for https://bugs.launchpad.net/gcc-linaro/+bug/605030
+ */
+#undef CALL_MCOUNT
+#define CALL_MCOUNT
+
ENTRY (__libc_do_syscall)
.fnstart
push {r7, lr}