--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/glibc-2.3.6/glibc-2.3.6-cvs-regcomp_c.patch Thu Feb 14 18:27:12 2008 +0100
@@ -0,0 +1,35 @@
+CVSROOT: /cvs/glibc
+Module name: libc
+Changes by: drepper@sources.redhat.com 2005-07-10 22:01:15
+
+Modified files:
+ posix : regcomp.c
+
+Log message:
+ (re_compile_internal): Call __libc_lock_init after init_dfa.
+
+===================================================================
+RCS file: /cvs/glibc/libc/posix/regcomp.c,v
+retrieving revision 1.95
+retrieving revision 1.96
+diff -u -r1.95 -r1.96
+--- libc/posix/regcomp.c 2005/05/06 23:33:52 1.95
++++ libc/posix/regcomp.c 2005/07/10 22:01:14 1.96
+@@ -774,8 +774,6 @@
+ }
+ preg->used = sizeof (re_dfa_t);
+
+- __libc_lock_init (dfa->lock);
+-
+ err = init_dfa (dfa, length);
+ if (BE (err != REG_NOERROR, 0))
+ {
+@@ -789,6 +787,8 @@
+ strncpy (dfa->re_str, pattern, length + 1);
+ #endif
+
++ __libc_lock_init (dfa->lock);
++
+ err = re_string_construct (®exp, pattern, length, preg->translate,
+ syntax & RE_ICASE, dfa);
+ if (BE (err != REG_NOERROR, 0))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/glibc-2.3.6/glibc-2.3.6-cvs-sqrt.patch Thu Feb 14 18:27:12 2008 +0100
@@ -0,0 +1,63 @@
+2005-10-13 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #1466]
+ * sysdeps/generic/s_csqrt.c (__csqrt): For zero real part, return
+ principal square root.
+ * sysdeps/generic/s_csqrtf.c (__csqrtf): Likewise.
+ * sysdeps/generic/s_csqrtl.c (__csqrtl): Likewise.
+
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/generic/s_csqrt.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/sysdeps/generic/s_csqrt.c 2001/07/06 04:55:49 1.2
++++ libc/sysdeps/generic/s_csqrt.c 2005/10/13 19:05:44 1.3
+@@ -79,8 +79,8 @@
+ {
+ double r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
+
+- __real__ res = __copysign (r, __imag__ x);
+- __imag__ res = r;
++ __real__ res = r;
++ __imag__ res = __copysign (r, __imag__ x);
+ }
+ else
+ {
+
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/generic/s_csqrtl.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/sysdeps/generic/s_csqrtl.c 2001/07/06 04:55:49 1.2
++++ libc/sysdeps/generic/s_csqrtl.c 2005/10/13 19:04:31 1.3
+@@ -79,8 +79,8 @@
+ {
+ long double r = __ieee754_sqrtl (0.5 * fabsl (__imag__ x));
+
+- __real__ res = __copysignl (r, __imag__ x);
+- __imag__ res = r;
++ __real__ res = r;
++ __imag__ res = __copysignl (r, __imag__ x);
+ }
+ else
+ {
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/generic/s_csqrtf.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/sysdeps/generic/s_csqrtf.c 2004/01/13 09:08:04 1.3
++++ libc/sysdeps/generic/s_csqrtf.c 2005/10/13 19:05:12 1.4
+@@ -79,8 +79,8 @@
+ {
+ float r = __ieee754_sqrtf (0.5 * fabsf (__imag__ x));
+
+- __real__ res = __copysignf (r, __imag__ x);
+- __imag__ res = r;
++ __real__ res = r;
++ __imag__ res = __copysignf (r, __imag__ x);
+ }
+ else
+ {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/glibc-2.3.6/glibc-2.3.6-forward-backward-collation.patch Thu Feb 14 18:27:12 2008 +0100
@@ -0,0 +1,96 @@
+# DP: Description: Fix segfault when strings contain a mix of forward
+# and backward rules.
+# DP: Related bugs: #310635 BZ645
+# DP: Dpatch Author: Denis Barbier <barbier@linuxfr.org>
+# DP: Patch Author: Denis Barbier
+# DP: Upstream status: fix in strxfrm_l.c has been committed upstream
+# DP: and strcoll_l.c has not been submitted yet.
+# DP: Test case: the following command segfaults in en_US.UTF-8 locale
+# DP: when BZ645 is fixed:
+# DP: echo 2d d194 0a 2d d194 0a | xxd -r -p | sort
+# DP: Date: 2006-03-17
+
+Index: glibc-2.3.6/string/strxfrm_l.c
+===================================================================
+--- glibc-2.3.6.orig/string/strxfrm_l.c
++++ glibc-2.3.6/string/strxfrm_l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1995,96,97,2002, 2004 Free Software Foundation, Inc.
++/* Copyright (C) 1995,96,97,2002, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+@@ -210,8 +210,9 @@
+ /* Handle the pushed elements now. */
+ size_t backw;
+
+- for (backw = idxcnt - 1; backw >= backw_stop; --backw)
++ for (backw = idxcnt; backw > backw_stop; )
+ {
++ --backw;
+ len = weights[idxarr[backw]++];
+
+ if (needed + len < n)
+@@ -293,8 +294,9 @@
+ /* Handle the pushed elements now. */
+ size_t backw;
+
+- for (backw = idxcnt - 1; backw >= backw_stop; --backw)
++ for (backw = idxcnt; backw > backw_stop; )
+ {
++ --backw;
+ len = weights[idxarr[backw]++];
+ if (len != 0)
+ {
+Index: glibc-2.3.6/string/strcoll_l.c
+===================================================================
+--- glibc-2.3.6.orig/string/strcoll_l.c
++++ glibc-2.3.6/string/strcoll_l.c
+@@ -186,7 +186,10 @@
+ /* The last pushed character was handled. Continue
+ with forward characters. */
+ if (idx1cnt < idx1max)
+- idx1now = idx1cnt;
++ {
++ idx1now = idx1cnt;
++ backw1_stop = ~0ul;
++ }
+ else
+ /* Nothing anymore. The backward sequence ended with
+ the last sequence in the string. Note that seq1len
+@@ -245,7 +248,10 @@
+ /* The last pushed character was handled. Continue
+ with forward characters. */
+ if (idx2cnt < idx2max)
+- idx2now = idx2cnt;
++ {
++ idx2now = idx2cnt;
++ backw2_stop = ~0ul;
++ }
+ else
+ /* Nothing anymore. The backward sequence ended with
+ the last sequence in the string. Note that seq2len
+@@ -370,7 +376,10 @@
+ /* The last pushed character was handled. Continue
+ with forward characters. */
+ if (idx1cnt < idx1max)
+- idx1now = idx1cnt;
++ {
++ idx1now = idx1cnt;
++ backw1_stop = ~0ul;
++ }
+ else
+ {
+ /* Nothing anymore. The backward sequence
+@@ -426,7 +435,10 @@
+ /* The last pushed character was handled. Continue
+ with forward characters. */
+ if (idx2cnt < idx2max)
+- idx2now = idx2cnt;
++ {
++ idx2now = idx2cnt;
++ backw2_stop = ~0ul;
++ }
+ else
+ {
+ /* Nothing anymore. The backward sequence