Changeset 762f470


Ignore:
Timestamp:
Jan 23, 2007, 5:39:47 PM (17 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
18bf2a3
Parents:
7e93668
Message:

Update to Glibc Branch Patch

Files:
1 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BOOK/introduction/common/changelog.xml

    r7e93668 r762f470  
    4343          <para>[jim] - Updated to Linux Headers 2.6.19.2-01232007.</para>
    4444        </listitem>
     45        <listitem>
     46          <para>[jim] - Update to Glibc Branch Update Patch.</para>
     47        </listitem>
    4548      </itemizedlist>
    4649    </listitem>
     
    7578      <itemizedlist>
    7679        <listitem>
    77           <para>[jim] - Updated to Glibc Branch Update Patch.</para>
    78         </listitem>
    79         <listitem>
    80           <para>[jim] - Updated to Binutils Branch Update Patch.</para>
     80          <para>[jim] - Update to Glibc Branch Update Patch.</para>
     81        </listitem>
     82        <listitem>
     83          <para>[jim] - Update to Binutils Branch Update Patch.</para>
    8184        </listitem>
    8285      </itemizedlist>
  • BOOK/patches.ent

    r7e93668 r762f470  
    4949<!ENTITY gcc-specs-patch-size "15 KB">
    5050
    51 <!ENTITY glibc-branch_update-patch "glibc-&glibc-version;-branch_update-2.patch">
    52 <!ENTITY glibc-branch_update-patch-md5 "dbc47088aa1371ef934bf8abb0d8a437">
    53 <!ENTITY glibc-branch_update-patch-size "1600 KB">
     51<!ENTITY glibc-branch_update-patch "glibc-&glibc-version;-branch_update-3.patch">
     52<!ENTITY glibc-branch_update-patch-md5 "0cb4331328ecfadc4fc81288fdbdb864">
     53<!ENTITY glibc-branch_update-patch-size "1644 KB">
    5454
    5555<!ENTITY glibc-libgcc_eh-patch "glibc-&glibc-version;-libgcc_eh-1.patch">
  • patches/glibc-2.5-branch_update-3.patch

    r7e93668 r762f470  
    11Submitted By: Jim Gifford <jim at linuxfromscratch dot org>
    22Original Submission By: Robert Connolly <robert at linuxfromscratch dot org>
    3 Date: 2007-01-12
     3Date: 2007-01-23
    44Initial Package Version: 2.5
    55Upstream Status: From Upstream
     
    1313diff -Naur glibc-2.5.orig/ChangeLog glibc-2.5/ChangeLog
    1414--- glibc-2.5.orig/ChangeLog    2006-09-29 11:45:39.000000000 -0700
    15 +++ glibc-2.5/ChangeLog 2007-01-12 09:20:08.000000000 -0800
    16 @@ -1,5 +1,283 @@
     15+++ glibc-2.5/ChangeLog 2007-01-12 10:24:52.000000000 -0800
     16@@ -1,5 +1,416 @@
     17+2007-01-05  Steven Munroe  <sjmunroe@us.ibm.com>
     18+
     19+       * stdlib/tst-makecontext.c: Include errno.h.  Change main()
     20+       to do_test().  Define TEST_FUNCTION. Include test-skeleton.c.
     21+       (do_test): Check errno and exit(0) if ENOSYS.
     22+
     23+2007-01-11  Jakub Jelinek  <jakub@redhat.com>
     24+
     25+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix handling of multi-byte
     26+       thousands separators.
     27+       * stdlib/Makefile: Add rules to build and run tst-strtod4.
     28+       * stdlib/tst-strtod4.c: New test.
     29+
     30+       [BZ #3855]
     31+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): 0x. not followed by
     32+       hexadecimal digit should accept just the initial 0.
     33+       * stdlib/tst-strtod2.c (tests): New variable.
     34+       (do_test): Run several tests rather than just one.
     35+
     36+2007-01-03  Ulrich Drepper  <drepper@redhat.com>
     37+
     38+       * stdlib/Makefile (tst-strtod3-ENV): Define.
     39+
     40+2006-12-11  Ulrich Drepper  <drepper@redhat.com>
     41+
     42+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
     43+       separators also if no non-zero digits found.
     44+       * stdlib/Makefile (tests): Add tst-strtod3.
     45+
     46+2006-12-09  Ulrich Drepper  <drepper@redhat.com>
     47+
     48+       [BZ #3664]
     49+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
     50+       empty parsed strings.
     51+       * stdlib/Makefile (tests): Add tst-strtod2.
     52+       * stdlib/tst-strtod2.c: New file.
     53+
     54+       [BZ #3673]
     55+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
     56+       computation.
     57+       * stdlib/Makefile (tests): Add tst-atof2.
     58+       * stdlib/tst-atof2.c: New file.
     59+
     60+       [BZ #3674]
     61+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
     62+       correctly if removing trailing zero of hex-float.
     63+       * stdlib/Makefile (tests): Add tst-atof1.
     64+       * stdlib/tst-atof1.c: New file.
     65+
     66+2007-01-03  Ulrich Drepper  <drepper@redhat.com>
     67+
     68+       * string/Makefile (tst-strxfrm2-ENV): Define.
     69+
     70+2006-11-10  Jakub Jelinek  <jakub@redhat.com>
     71+
     72+       * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
     73+       if N is one bigger than return value.
     74+       * string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
     75+       and l1 last arguments, if buf is defined, verify the return value
     76+       equals to strlen (buf) and verify no byte beyond passed length
     77+       is modified.
     78+
     79+2006-11-09  Ulrich Drepper  <drepper@redhat.com>
     80+
     81+       * string/Makefile (tests): Add tst-strxfrm2.
     82+       * string/tst-strxfrm2.c: New file.
     83+
     84+2006-11-08  Jakub Jelinek  <jakub@redhat.com>
     85+
     86+       * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
     87+       optimization even if needed > n.
     88+
     89+2006-12-22  Gavin Romig-Koch  <gavin@redhat.com>
     90+
     91+       * nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't
     92+       blacklist the group till after we look it up.
     93+
     94+2006-12-21  Ulrich Drepper  <drepper@redhat.com>
     95+
     96+       * include/atomic.h (atomic_forced_read): New macro.
     97+
     98+2006-12-19  Jakub Jelinek  <jakub@redhat.com>
     99+
     100+       * nss/getXXbyYY_r.c: Include atomic.h.
     101+       (INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
     102+       add atomic_write_barrier () in between.
     103+
     104+2006-12-18  Jakub Jelinek  <jakub@redhat.com>
     105+
     106+       [BZ #3747]
     107+       * stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the
     108+       [-231 .. 231) range.
     109+       * stdlib/tst-rand48.c (main): Fix expected values for 64-bit
     110+       targets.
     111+       * stdlib/tst-rand48-2.c: New test.
     112+       * stdlib/Makefile (tests): Add tst-rand48-2.
     113+
     114+2006-12-14  Jakub Jelinek  <jakub@redhat.com>
     115+
     116+       * misc/tst-pselect.c (do_test): Fix sigblock argument.
     117+
     118+2006-12-14  Ulrich Drepper  <drepper@redhat.com>
     119+
     120+       * misc/tst-pselect.c (do_test): Make sure the helper process is
     121+       terminating when the test is aborted.
     122+
     123+2006-12-13  Ulrich Drepper  <drepper@redhat.com>
     124+
     125+       [BZ #2337]
     126+       * libio/Makefile (tests): Add tst-setvbuf1.
     127+       * libio/tst-setvbuf1.c: New file.
     128+
     129+2006-12-08  Jakub Jelinek  <jakub@redhat.com>
     130+
     131+       [BZ #2337]
     132+       * libio/genops.c (__uflow): Fix a typo.
     133+       * libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat
     134+       nor set _IO_LINE_BUF bit here.  Size the wide buffer based on
     135+       the narrow buffer size.
     136+
     137+2006-11-24  Jakub Jelinek  <jakub@redhat.com>
     138+
     139+       [BZ #2337]
     140+       * libio/libio.h (_IO_FLAGS2_USER_WBUF): Define.
     141+       * libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set
     142+       _IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit
     143+       in _flags.
     144+       * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf,
     145+       _IO_wstr_finish): Likewise.
     146+       * libio/wmemstream.c (open_wmemstream): Likewise.
     147+       * libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp]
     148+       even for wide streams.
     149+
    17150+2006-12-09  Jakub Jelinek  <jakub@redhat.com>
    18151+
     
    660793+  return 0;
    661794+}
     795diff -Naur glibc-2.5.orig/include/atomic.h glibc-2.5/include/atomic.h
     796--- glibc-2.5.orig/include/atomic.h     2006-02-17 10:50:09.000000000 -0800
     797+++ glibc-2.5/include/atomic.h  2007-01-12 09:58:08.000000000 -0800
     798@@ -324,6 +324,12 @@
     799 #endif
     800 
     801 
     802+#ifndef atomic_forced_read
     803+# define atomic_forced_read(x) \
     804+  ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
     805+#endif
     806+
     807+
     808 #ifndef atomic_delay
     809 # define atomic_delay() do { /* nothing */ } while (0)
     810 #endif
    662811diff -Naur glibc-2.5.orig/include/features.h glibc-2.5/include/features.h
    663812--- glibc-2.5.orig/include/features.h   2006-04-25 13:34:32.000000000 -0700
     
    728877 distribute     := ftwtest-sh
    729878 
     879diff -Naur glibc-2.5.orig/io/tst-ttyname_r.c glibc-2.5/io/tst-ttyname_r.c
     880--- glibc-2.5.orig/io/tst-ttyname_r.c   1969-12-31 16:00:00.000000000 -0800
     881+++ glibc-2.5/io/tst-ttyname_r.c        2007-01-12 09:27:52.000000000 -0800
     882@@ -0,0 +1,42 @@
     883+#include <errno.h>
     884+#include <error.h>
     885+#include <fcntl.h>
     886+#include <stdio.h>
     887+#include <unistd.h>
     888+
     889+static void do_prepare (void);
     890+#define PREPARE(argc, argv) do_prepare ()
     891+static int do_test (void);
     892+#define TEST_FUNCTION do_test ()
     893+#include <test-skeleton.c>
     894+
     895+static int temp_fd;
     896+
     897+static void
     898+do_prepare (void)
     899+{
     900+  char *temp_file;
     901+  temp_fd = create_temp_file ("tst-ttyname_r.", &temp_file);
     902+  if (temp_fd == -1)
     903+    error (1, errno, "cannot create temporary file");
     904+}
     905+
     906+static int
     907+do_test (void)
     908+{
     909+  int ret = 0;
     910+  char buf[sysconf (_SC_TTY_NAME_MAX) + 1];
     911+  int res = ttyname_r (-1, buf, sizeof (buf));
     912+  if (res != EBADF)
     913+    {
     914+      printf ("1st ttyname_r returned with res %d\n", res);
     915+      ret++;
     916+    }
     917+  res = ttyname_r (temp_fd, buf, sizeof (buf));
     918+  if (res != ENOTTY)
     919+    {
     920+      printf ("2nd ttyname_r returned with res %d\n", res);
     921+      ret++;
     922+    }
     923+  return ret;
     924+}
    730925diff -Naur glibc-2.5.orig/libio/bug-wmemstream1.c glibc-2.5/libio/bug-wmemstream1.c
    731926--- glibc-2.5.orig/libio/bug-wmemstream1.c      2006-08-14 15:11:34.000000000 -0700
     
    738933 
    739934 static int
     935diff -Naur glibc-2.5.orig/libio/fileops.c glibc-2.5/libio/fileops.c
     936--- glibc-2.5.orig/libio/fileops.c      2006-01-18 16:38:35.000000000 -0800
     937+++ glibc-2.5/libio/fileops.c   2007-01-12 09:25:38.000000000 -0800
     938@@ -174,14 +174,8 @@
     939   close_status = _IO_SYSCLOSE (fp);
     940 
     941   /* Free buffer. */
     942-  if (fp->_mode <= 0)
     943-    {
     944-      INTUSE(_IO_setb) (fp, NULL, NULL, 0);
     945-      _IO_setg (fp, NULL, NULL, NULL);
     946-      _IO_setp (fp, NULL, NULL);
     947-    }
     948 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
     949-  else
     950+  if (fp->_mode > 0)
     951     {
     952       if (_IO_have_wbackup (fp))
     953        INTUSE(_IO_free_wbackup_area) (fp);
     954@@ -190,6 +184,9 @@
     955       _IO_wsetp (fp, NULL, NULL);
     956     }
     957 #endif
     958+  INTUSE(_IO_setb) (fp, NULL, NULL, 0);
     959+  _IO_setg (fp, NULL, NULL, NULL);
     960+  _IO_setp (fp, NULL, NULL);
     961 
     962   INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
     963   fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS;
     964diff -Naur glibc-2.5.orig/libio/genops.c glibc-2.5/libio/genops.c
     965--- glibc-2.5.orig/libio/genops.c       2006-02-28 21:32:48.000000000 -0800
     966+++ glibc-2.5/libio/genops.c    2007-01-12 09:25:38.000000000 -0800
     967@@ -367,7 +367,7 @@
     968 #endif
     969 
     970   if (fp->_mode == 0)
     971-    _IO_fwide (fp, -11);
     972+    _IO_fwide (fp, -1);
     973   if (_IO_in_put_mode (fp))
     974     if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF)
     975       return EOF;
     976diff -Naur glibc-2.5.orig/libio/libio.h glibc-2.5/libio/libio.h
     977--- glibc-2.5.orig/libio/libio.h        2006-01-14 04:09:46.000000000 -0800
     978+++ glibc-2.5/libio/libio.h     2007-01-12 09:25:38.000000000 -0800
     979@@ -142,6 +142,7 @@
     980 #ifdef _LIBC
     981 # define _IO_FLAGS2_FORTIFY 4
     982 #endif
     983+#define _IO_FLAGS2_USER_WBUF 8
     984 
     985 /* These are "formatting flags" matching the iostream fmtflags enum values. */
     986 #define _IO_SKIPWS 01
     987diff -Naur glibc-2.5.orig/libio/Makefile glibc-2.5/libio/Makefile
     988--- glibc-2.5.orig/libio/Makefile       2006-08-14 15:12:27.000000000 -0700
     989+++ glibc-2.5/libio/Makefile    2007-01-12 09:25:38.000000000 -0800
     990@@ -57,7 +57,8 @@
     991        bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
     992        tst-memstream1 tst-memstream2 \
     993        tst-wmemstream1 tst-wmemstream2 \
     994-       bug-memstream1 bug-wmemstream1
     995+       bug-memstream1 bug-wmemstream1 \
     996+       tst-setvbuf1
     997 test-srcs = test-freopen
     998 
     999 all: # Make this the default target; it will be defined in Rules.
     1000diff -Naur glibc-2.5.orig/libio/tst-setvbuf1.c glibc-2.5/libio/tst-setvbuf1.c
     1001--- glibc-2.5.orig/libio/tst-setvbuf1.c 1969-12-31 16:00:00.000000000 -0800
     1002+++ glibc-2.5/libio/tst-setvbuf1.c      2007-01-12 09:25:38.000000000 -0800
     1003@@ -0,0 +1,39 @@
     1004+/* Dereived from the test case in BZ #2337.  */
     1005+#include <errno.h>
     1006+#include <error.h>
     1007+#include <fcntl.h>
     1008+#include <locale.h>
     1009+#include <stdio.h>
     1010+#include <stdlib.h>
     1011+#include <string.h>
     1012+#include <unistd.h>
     1013+#include <wchar.h>
     1014+
     1015+
     1016+static char buf[512] __attribute__ ((aligned (4096)));
     1017+
     1018+
     1019+static int
     1020+do_test (void)
     1021+{
     1022+  setlocale (LC_ALL, "de_DE.UTF-8");
     1023+
     1024+  FILE *fp = fdopen (dup (STDOUT_FILENO), "a");
     1025+  if (fp == NULL)
     1026+    error (EXIT_FAILURE, errno, "fdopen(,\"a\")");
     1027+
     1028+  setvbuf (fp, buf, _IOFBF, sizeof (buf));
     1029+
     1030+  /* fwprintf to unbuffered stream.   */
     1031+  fwprintf (fp, L"hello.\n");
     1032+
     1033+  fclose (fp);
     1034+
     1035+  /* touch my buffer */
     1036+  buf[45] = 'a';
     1037+
     1038+  return 0;
     1039+}
     1040+
     1041+#define TEST_FUNCTION do_test ()
     1042+#include "../test-skeleton.c"
    7401043diff -Naur glibc-2.5.orig/libio/tst-wmemstream1.c glibc-2.5/libio/tst-wmemstream1.c
    7411044--- glibc-2.5.orig/libio/tst-wmemstream1.c      2006-01-11 18:02:27.000000000 -0800
     
    7561059 #define W(o) L##o
    7571060 #define OPEN_MEMSTREAM open_wmemstream
     1061diff -Naur glibc-2.5.orig/libio/wfiledoalloc.c glibc-2.5/libio/wfiledoalloc.c
     1062--- glibc-2.5.orig/libio/wfiledoalloc.c 2002-07-05 23:35:54.000000000 -0700
     1063+++ glibc-2.5/libio/wfiledoalloc.c      2007-01-12 09:25:38.000000000 -0800
     1064@@ -1,4 +1,5 @@
     1065-/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
     1066+/* Copyright (C) 1993, 1997, 1999, 2000, 2002, 2006
     1067+   Free Software Foundation, Inc.
     1068    This file is part of the GNU C Library.
     1069 
     1070    The GNU C Library is free software; you can redistribute it and/or
     1071@@ -85,35 +86,20 @@
     1072      _IO_FILE *fp;
     1073 {
     1074   _IO_size_t size;
     1075-  int couldbetty;
     1076   wchar_t *p;
     1077-  struct _G_stat64 st;
     1078 
     1079   /* Allocate room for the external buffer.  */
     1080   if (fp->_IO_buf_base == NULL)
     1081     INTUSE(_IO_file_doallocate) (fp);
     1082 
     1083-  if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
     1084-    {
     1085-      couldbetty = 0;
     1086-      size = _IO_BUFSIZ;
     1087-#if 0
     1088-      /* do not try to optimise fseek() */
     1089-      fp->_flags |= __SNPT;
     1090-#endif
     1091-    }
     1092-  else
     1093-    {
     1094-      couldbetty = S_ISCHR (st.st_mode);
     1095-#if _IO_HAVE_ST_BLKSIZE
     1096-      size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
     1097-#else
     1098-      size = _IO_BUFSIZ;
     1099-#endif
     1100-    }
     1101+  /* If narrow buffer is user allocated (set by setvbuf etc.),
     1102+     use that size as the size of the wide buffer, when it is
     1103+     allocated by _IO_file_doallocate, multiply that by size
     1104+     of the wide character.  */
     1105+  size = fp->_IO_buf_end - fp->_IO_buf_base;
     1106+  if ((fp->_flags & _IO_USER_BUF))
     1107+    size = (size + sizeof (wchar_t) - 1) / sizeof (wchar_t);
     1108   ALLOC_WBUF (p, size * sizeof (wchar_t), EOF);
     1109   INTUSE(_IO_wsetb) (fp, p, p + size, 1);
     1110-  if (couldbetty && isatty (fp->_fileno))
     1111-    fp->_flags |= _IO_LINE_BUF;
     1112   return 1;
     1113 }
     1114diff -Naur glibc-2.5.orig/libio/wgenops.c glibc-2.5/libio/wgenops.c
     1115--- glibc-2.5.orig/libio/wgenops.c      2006-02-12 13:20:57.000000000 -0800
     1116+++ glibc-2.5/libio/wgenops.c   2007-01-12 09:25:38.000000000 -0800
     1117@@ -115,14 +115,14 @@
     1118      wchar_t *eb;
     1119      int a;
     1120 {
     1121-  if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
     1122+  if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
     1123     FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t));
     1124   f->_wide_data->_IO_buf_base = b;
     1125   f->_wide_data->_IO_buf_end = eb;
     1126   if (a)
     1127-    f->_flags &= ~_IO_USER_BUF;
     1128+    f->_flags2 &= ~_IO_FLAGS2_USER_WBUF;
     1129   else
     1130-    f->_flags |= _IO_USER_BUF;
     1131+    f->_flags2 |= _IO_FLAGS2_USER_WBUF;
     1132 }
     1133 INTDEF(_IO_wsetb)
     1134 
     1135@@ -198,7 +198,7 @@
     1136      int dummy;
     1137 {
     1138   struct _IO_marker *mark;
     1139-  if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
     1140+  if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
     1141     {
     1142       FREE_BUF (fp->_wide_data->_IO_buf_base,
     1143                _IO_wblen (fp) * sizeof (wchar_t));
    7581144diff -Naur glibc-2.5.orig/libio/wmemstream.c glibc-2.5/libio/wmemstream.c
    7591145--- glibc-2.5.orig/libio/wmemstream.c   2006-08-14 15:13:48.000000000 -0700
    760 +++ glibc-2.5/libio/wmemstream.c        2006-09-29 17:06:33.000000000 -0700
     1146+++ glibc-2.5/libio/wmemstream.c        2007-01-12 09:25:38.000000000 -0800
    7611147@@ -20,6 +20,7 @@
    7621148 #include "strfile.h"
     
    7671153 
    7681154 struct _IO_FILE_wmemstream
     1155@@ -91,7 +92,7 @@
     1156   _IO_fwide (&new_f->fp._sf._sbf._f, 1);
     1157   _IO_wstr_init_static (&new_f->fp._sf._sbf._f, buf,
     1158                        _IO_BUFSIZ / sizeof (wchar_t), buf);
     1159-  new_f->fp._sf._sbf._f._flags &= ~_IO_USER_BUF;
     1160+  new_f->fp._sf._sbf._f._flags2 &= ~_IO_FLAGS2_USER_WBUF;
     1161   new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
     1162   new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
     1163 
     1164diff -Naur glibc-2.5.orig/libio/wstrops.c glibc-2.5/libio/wstrops.c
     1165--- glibc-2.5.orig/libio/wstrops.c      2006-08-14 15:14:53.000000000 -0700
     1166+++ glibc-2.5/libio/wstrops.c   2007-01-12 09:25:38.000000000 -0800
     1167@@ -88,7 +88,7 @@
     1168   pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base;
     1169   if (pos >= (_IO_size_t) (_IO_wblen (fp) + flush_only))
     1170     {
     1171-      if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */
     1172+      if (fp->_flags2 & _IO_FLAGS2_USER_WBUF) /* not allowed to enlarge */
     1173        return WEOF;
     1174       else
     1175        {
     1176@@ -182,7 +182,7 @@
     1177   _IO_ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base;
     1178 
     1179   /* Try to enlarge the buffer.  */
     1180-  if (fp->_flags & _IO_USER_BUF)
     1181+  if (fp->_flags2 & _IO_FLAGS2_USER_WBUF)
     1182     /* User-provided buffer.  */
     1183     return 1;
     1184 
     1185@@ -335,7 +335,7 @@
     1186      _IO_FILE *fp;
     1187      int dummy;
     1188 {
     1189-  if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
     1190+  if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
     1191     (((_IO_strfile *) fp)->_s._free_buffer) (fp->_wide_data->_IO_buf_base);
     1192   fp->_wide_data->_IO_buf_base = NULL;
     1193 
    7691194diff -Naur glibc-2.5.orig/localedata/ChangeLog glibc-2.5/localedata/ChangeLog
    7701195--- glibc-2.5.orig/localedata/ChangeLog 2006-09-29 11:30:52.000000000 -0700
     
    11551580+  return result;
    11561581+}
     1582diff -Naur glibc-2.5.orig/misc/tst-pselect.c glibc-2.5/misc/tst-pselect.c
     1583--- glibc-2.5.orig/misc/tst-pselect.c   2006-01-21 11:58:31.000000000 -0800
     1584+++ glibc-2.5/misc/tst-pselect.c        2007-01-12 09:49:04.000000000 -0800
     1585@@ -29,7 +29,16 @@
     1586       return 1;
     1587     }
     1588 
     1589-  if (sigblock (SIGUSR1) != 0)
     1590+  sa.sa_handler = SIG_IGN;
     1591+  sa.sa_flags = SA_NOCLDWAIT;
     1592+
     1593+  if (sigaction (SIGCHLD, &sa, NULL) != 0)
     1594+    {
     1595+      puts ("2nd sigaction failed");
     1596+      return 1;
     1597+    }
     1598+
     1599+  if (sigblock (sigmask (SIGUSR1)) != 0)
     1600     {
     1601       puts ("sigblock failed");
     1602       return 1;
     1603@@ -52,6 +61,7 @@
     1604 
     1605   struct timespec to = { .tv_sec = 0, .tv_nsec = 500000000 };
     1606 
     1607+  pid_t parent = getpid ();
     1608   pid_t p = fork ();
     1609   if (p == 0)
     1610     {
     1611@@ -63,6 +73,9 @@
     1612       int e;
     1613       do
     1614        {
     1615+         if (getppid () != parent)
     1616+           exit (2);
     1617+
     1618          errno = 0;
     1619          e = pselect (fds[0][0] + 1, &rfds, NULL, NULL, &to, &ss);
     1620        }
     1621@@ -108,12 +121,6 @@
     1622       return 1;
     1623     }
     1624 
     1625-  if (TEMP_FAILURE_RETRY (waitpid (p, NULL, 0)) != p)
     1626-    {
     1627-      puts ("waitpid failed");
     1628-      return 1;
     1629-    }
     1630-
     1631   return 0;
     1632 }
     1633 
    11571634diff -Naur glibc-2.5.orig/nis/Makefile glibc-2.5/nis/Makefile
    11581635--- glibc-2.5.orig/nis/Makefile 2006-04-13 22:45:49.000000000 -0700
     
    13141791 }
    13151792 libnsl_hidden_def (nis_list)
     1793diff -Naur glibc-2.5.orig/nis/nss_compat/compat-grp.c glibc-2.5/nis/nss_compat/compat-grp.c
     1794--- glibc-2.5.orig/nis/nss_compat/compat-grp.c  2006-07-31 16:33:04.000000000 -0700
     1795+++ glibc-2.5/nis/nss_compat/compat-grp.c       2007-01-12 09:59:51.000000000 -0800
     1796@@ -580,13 +580,17 @@
     1797       /* +group */
     1798       if (result->gr_name[0] == '+' && result->gr_name[1] != '\0')
     1799        {
     1800+         /* Yes, no +1, see the memcpy call below.  */
     1801+         size_t len = strlen (result->gr_name);
     1802+         char buf[len];
     1803          enum nss_status status;
     1804 
     1805          /* Store the group in the blacklist for the "+" at the end of
     1806             /etc/group */
     1807-         blacklist_store_name (&result->gr_name[1], ent);
     1808+         memcpy (buf, &result->gr_name[1], len);
     1809          status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
     1810                                       buffer, buflen, errnop);
     1811+         blacklist_store_name (buf, ent);
     1812          if (status == NSS_STATUS_SUCCESS && result->gr_gid == gid)
     1813            break;
     1814          else
    13161815diff -Naur glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c glibc-2.5/nis/nss_nisplus/nisplus-grp.c
    13171816--- glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c        2006-05-20 12:20:19.000000000 -0700
     
    16032102   }
    16042103 }
     2104diff -Naur glibc-2.5.orig/nptl/ChangeLog glibc-2.5/nptl/ChangeLog
     2105--- glibc-2.5.orig/nptl/ChangeLog       2006-09-24 10:14:11.000000000 -0700
     2106+++ glibc-2.5/nptl/ChangeLog    2007-01-12 10:14:34.000000000 -0800
     2107@@ -1,3 +1,12 @@
     2108+2006-12-28  David S. Miller  <davem@davemloft.net>
     2109+
     2110+       * shlib-versions: Fix sparc64 linux target specification.
     2111+
     2112+2006-12-21  Jakub Jelinek  <jakub@redhat.com>
     2113+
     2114+       * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
     2115+       tid isn't reread from pd->tid in between ESRCH test and the syscall.
     2116+
     2117 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
     2118 
     2119        [BZ #3251]
     2120diff -Naur glibc-2.5.orig/nptl/shlib-versions glibc-2.5/nptl/shlib-versions
     2121--- glibc-2.5.orig/nptl/shlib-versions  2004-07-05 10:03:27.000000000 -0700
     2122+++ glibc-2.5/nptl/shlib-versions       2007-01-12 10:14:34.000000000 -0800
     2123@@ -1,5 +1,5 @@
     2124 mips.*-.*-linux.*      libpthread=0            GLIBC_2.0 GLIBC_2.2
     2125-sparc64-.*-linux.*     libpthread=0            GLIBC_2.2
     2126+sparc64.*-.*-linux.*   libpthread=0            GLIBC_2.2
     2127 sh.*-.*-linux.*                libpthread=0            GLIBC_2.2
     2128 ia64.*-.*-linux.*      libpthread=0            GLIBC_2.2
     2129 hppa.*-.*-linux.*      libpthread=0            GLIBC_2.2
     2130diff -Naur glibc-2.5.orig/nptl/sysdeps/unix/sysv/linux/pthread_kill.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
     2131--- glibc-2.5.orig/nptl/sysdeps/unix/sysv/linux/pthread_kill.c  2004-09-28 15:22:37.000000000 -0700
     2132+++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c       2007-01-12 09:58:08.000000000 -0800
     2133@@ -1,4 +1,4 @@
     2134-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
     2135+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
     2136    This file is part of the GNU C Library.
     2137    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
     2138 
     2139@@ -33,7 +33,15 @@
     2140   struct pthread *pd = (struct pthread *) threadid;
     2141 
     2142   /* Make sure the descriptor is valid.  */
     2143-  if (INVALID_TD_P (pd))
     2144+  if (DEBUGGING_P && INVALID_TD_P (pd))
     2145+    /* Not a valid thread handle.  */
     2146+    return ESRCH;
     2147+
     2148+  /* Force load of pd->tid into local variable or register.  Otherwise
     2149+     if a thread exits between ESRCH test and tgkill, we might return
     2150+     EINVAL, because pd->tid would be cleared by the kernel.  */
     2151+  pid_t tid = atomic_forced_read (pd->tid);
     2152+  if (__builtin_expect (tid <= 0, 0))
     2153     /* Not a valid thread handle.  */
     2154     return ESRCH;
     2155 
     2156@@ -53,15 +61,15 @@
     2157   int val;
     2158 #if __ASSUME_TGKILL
     2159   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
     2160-                         pd->tid, signo);
     2161+                         tid, signo);
     2162 #else
     2163 # ifdef __NR_tgkill
     2164   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
     2165-                         pd->tid, signo);
     2166+                         tid, signo);
     2167   if (INTERNAL_SYSCALL_ERROR_P (val, err)
     2168       && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
     2169 # endif
     2170-    val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo);
     2171+    val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo);
     2172 #endif
     2173 
     2174   return (INTERNAL_SYSCALL_ERROR_P (val, err)
    16052175diff -Naur glibc-2.5.orig/nptl_db/ChangeLog glibc-2.5/nptl_db/ChangeLog
    16062176--- glibc-2.5.orig/nptl_db/ChangeLog    2006-02-03 16:48:40.000000000 -0800
     
    17282298        }
    17292299 
     2300diff -Naur glibc-2.5.orig/nss/getXXbyYY_r.c glibc-2.5/nss/getXXbyYY_r.c
     2301--- glibc-2.5.orig/nss/getXXbyYY_r.c    2004-09-16 15:24:09.000000000 -0700
     2302+++ glibc-2.5/nss/getXXbyYY_r.c 2007-01-12 09:53:27.000000000 -0800
     2303@@ -1,4 +1,4 @@
     2304-/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
     2305+/* Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
     2306    This file is part of the GNU C Library.
     2307    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
     2308 
     2309@@ -18,6 +18,7 @@
     2310    02111-1307 USA.  */
     2311 
     2312 #include <assert.h>
     2313+#include <atomic.h>
     2314 #include <errno.h>
     2315 #include <stdbool.h>
     2316 #include "nsswitch.h"
     2317@@ -173,9 +174,6 @@
     2318        startp = (service_user *) -1l;
     2319       else
     2320        {
     2321-         startp = nip;
     2322-         start_fct = fct.l;
     2323-
     2324 #ifdef NEED__RES
     2325          /* The resolver code will really be used so we have to
     2326             initialize it.  */
     2327@@ -190,6 +188,11 @@
     2328          if (!_res_hconf.initialized)
     2329            _res_hconf_init ();
     2330 #endif /* need _res_hconf */
     2331+
     2332+         start_fct = fct.l;
     2333+         /* Make sure start_fct is written before startp.  */
     2334+         atomic_write_barrier ();
     2335+         startp = nip;
     2336        }
     2337     }
     2338   else
    17302339diff -Naur glibc-2.5.orig/nss/nss_files/files-alias.c glibc-2.5/nss/nss_files/files-alias.c
    17312340--- glibc-2.5.orig/nss/nss_files/files-alias.c  2002-09-01 05:38:05.000000000 -0700
     
    4598846597 GNU/Hurd system, using configurations i[34567]86-*-gnu.
    4598946598 
     46599diff -Naur glibc-2.5.orig/stdlib/jrand48_r.c glibc-2.5/stdlib/jrand48_r.c
     46600--- glibc-2.5.orig/stdlib/jrand48_r.c   2001-07-05 21:55:41.000000000 -0700
     46601+++ glibc-2.5/stdlib/jrand48_r.c        2007-01-12 09:52:07.000000000 -0800
     46602@@ -1,4 +1,4 @@
     46603-/* Copyright (C) 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
     46604+/* Copyright (C) 1995, 1997, 1998, 2001, 2006 Free Software Foundation, Inc.
     46605    This file is part of the GNU C Library.
     46606    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
     46607 
     46608@@ -30,7 +30,7 @@
     46609     return -1;
     46610 
     46611   /* Store the result.  */
     46612-  *result = ((xsubi[2] << 16) | xsubi[1]) & 0xffffffffl;
     46613+  *result = (int32_t) ((xsubi[2] << 16) | xsubi[1]);
     46614 
     46615   return 0;
     46616 }
     46617diff -Naur glibc-2.5.orig/stdlib/Makefile glibc-2.5/stdlib/Makefile
     46618--- glibc-2.5.orig/stdlib/Makefile      2006-08-21 14:02:11.000000000 -0700
     46619+++ glibc-2.5/stdlib/Makefile   2007-01-12 10:23:27.000000000 -0800
     46620@@ -1,4 +1,4 @@
     46621-# Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
     46622+# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
     46623 # This file is part of the GNU C Library.
     46624 
     46625 # The GNU C Library is free software; you can redistribute it and/or
     46626@@ -66,7 +66,9 @@
     46627                   test-canon test-canon2 tst-strtoll tst-environ           \
     46628                   tst-xpg-basename tst-random tst-random2 tst-bsearch      \
     46629                   tst-limits tst-rand48 bug-strtod tst-setcontext          \
     46630-                  test-a64l tst-qsort tst-system testmb2 bug-strtod2
     46631+                  test-a64l tst-qsort tst-system testmb2 bug-strtod2       \
     46632+                  tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
     46633+                  tst-makecontext tst-strtod4
     46634 
     46635 include ../Makeconfig
     46636 
     46637@@ -115,6 +117,8 @@
     46638 test-canon-ARGS = --test-dir=${common-objpfx}stdlib
     46639 
     46640 tst-strtod-ENV = LOCPATH=$(common-objpfx)localedata
     46641+tst-strtod3-ENV = LOCPATH=$(common-objpfx)localedata
     46642+tst-strtod4-ENV = LOCPATH=$(common-objpfx)localedata
     46643 testmb2-ENV = LOCPATH=$(common-objpfx)localedata
     46644 
     46645 # Run a test on the header files we use.
     46646diff -Naur glibc-2.5.orig/stdlib/strtod_l.c glibc-2.5/stdlib/strtod_l.c
     46647--- glibc-2.5.orig/stdlib/strtod_l.c    2006-01-14 04:09:09.000000000 -0800
     46648+++ glibc-2.5/stdlib/strtod_l.c 2007-01-12 10:23:27.000000000 -0800
     46649@@ -1,5 +1,6 @@
     46650 /* Convert string representing a number to float value, using given locale.
     46651-   Copyright (C) 1997,1998,2002,2004,2005,2006 Free Software Foundation, Inc.
     46652+   Copyright (C) 1997,1998,2002,2004,2005,2006,2007
     46653+   Free Software Foundation, Inc.
     46654    This file is part of the GNU C Library.
     46655    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
     46656 
     46657@@ -650,10 +651,11 @@
     46658          if (c != '0')
     46659            {
     46660              for (cnt = 0; thousands[cnt] != '\0'; ++cnt)
     46661-               if (c != thousands[cnt])
     46662+               if (thousands[cnt] != cp[cnt])
     46663                  break;
     46664              if (thousands[cnt] != '\0')
     46665                break;
     46666+             cp += cnt - 1;
     46667            }
     46668          c = *++cp;
     46669        }
     46670@@ -662,20 +664,29 @@
     46671 
     46672   /* If no other digit but a '0' is found the result is 0.0.
     46673      Return current read pointer.  */
     46674-  if ((c < L_('0') || c > L_('9'))
     46675-      && (base == 16 && (c < (CHAR_TYPE) TOLOWER (L_('a'))
     46676-                        || c > (CHAR_TYPE) TOLOWER (L_('f'))))
     46677+  if (!((c >= L_('0') && c <= L_('9'))
     46678+       || (base == 16 && ((CHAR_TYPE) TOLOWER (c) >= L_('a')
     46679+                          && (CHAR_TYPE) TOLOWER (c) <= L_('f')))
     46680+       || (
     46681 #ifdef USE_WIDE_CHAR
     46682-      && c != (wint_t) decimal
     46683+           c == (wint_t) decimal
     46684 #else
     46685-      && ({ for (cnt = 0; decimal[cnt] != '\0'; ++cnt)
     46686-             if (decimal[cnt] != cp[cnt])
     46687-               break;
     46688-           decimal[cnt] != '\0'; })
     46689-#endif
     46690-      && (base == 16 && (cp == start_of_digits
     46691-                        || (CHAR_TYPE) TOLOWER (c) != L_('p')))
     46692-      && (base != 16 && (CHAR_TYPE) TOLOWER (c) != L_('e')))
     46693+           ({ for (cnt = 0; decimal[cnt] != '\0'; ++cnt)
     46694+                if (decimal[cnt] != cp[cnt])
     46695+                  break;
     46696+              decimal[cnt] == '\0'; })
     46697+#endif
     46698+           /* '0x.' alone is not a valid hexadecimal number.
     46699+              '.' alone is not valid either, but that has been checked
     46700+              already earlier.  */
     46701+           && (base != 16
     46702+               || cp != start_of_digits
     46703+               || (cp[decimal_len] >= L_('0') && cp[decimal_len] <= L_('9'))
     46704+               || ((CHAR_TYPE) TOLOWER (cp[decimal_len]) >= L_('a')
     46705+                   && (CHAR_TYPE) TOLOWER (cp[decimal_len]) <= L_('f'))))
     46706+       || (base == 16 && (cp != start_of_digits
     46707+                          && (CHAR_TYPE) TOLOWER (c) == L_('p')))
     46708+       || (base != 16 && (CHAR_TYPE) TOLOWER (c) == L_('e'))))
     46709     {
     46710 #ifdef USE_WIDE_CHAR
     46711       tp = __correctly_grouped_prefixwc (start_of_digits, cp, thousands,
     46712@@ -715,13 +726,14 @@
     46713                  break;
     46714              if (thousands[cnt] != '\0')
     46715                break;
     46716+             cp += cnt - 1;
     46717            }
     46718 #endif
     46719        }
     46720       c = *++cp;
     46721     }
     46722 
     46723-  if (grouping && dig_no > 0)
     46724+  if (grouping && cp > start_of_digits)
     46725     {
     46726       /* Check the grouping of the digits.  */
     46727 #ifdef USE_WIDE_CHAR
     46728@@ -759,13 +771,15 @@
     46729        }
     46730     }
     46731 
     46732-  /* We have the number digits in the integer part.  Whether these are all or
     46733-     any is really a fractional digit will be decided later.  */
     46734+  /* We have the number of digits in the integer part.  Whether these
     46735+     are all or any is really a fractional digit will be decided
     46736+     later.  */
     46737   int_no = dig_no;
     46738   lead_zero = int_no == 0 ? -1 : 0;
     46739 
     46740-  /* Read the fractional digits.  A special case are the 'american style'
     46741-     numbers like `16.' i.e. with decimal but without trailing digits.  */
     46742+  /* Read the fractional digits.  A special case are the 'american
     46743+     style' numbers like `16.' i.e. with decimal point but without
     46744+     trailing digits.  */
     46745   if (
     46746 #ifdef USE_WIDE_CHAR
     46747       c == (wint_t) decimal
     46748@@ -815,15 +829,16 @@
     46749          if (base == 16)
     46750            exp_limit = (exp_negative ?
     46751                         -MIN_EXP + MANT_DIG + 4 * int_no :
     46752-                        MAX_EXP - 4 * int_no + lead_zero);
     46753+                        MAX_EXP - 4 * int_no + 4 * lead_zero + 3);
     46754          else
     46755            exp_limit = (exp_negative ?
     46756                         -MIN_10_EXP + MANT_DIG + int_no :
     46757-                        MAX_10_EXP - int_no + lead_zero);
     46758+                        MAX_10_EXP - int_no + lead_zero + 1);
     46759 
     46760          do
     46761            {
     46762              exponent *= 10;
     46763+             exponent += c - L_('0');
     46764 
     46765              if (exponent > exp_limit)
     46766                /* The exponent is too large/small to represent a valid
     46767@@ -853,7 +868,6 @@
     46768                  /* NOTREACHED */
     46769                }
     46770 
     46771-             exponent += c - L_('0');
     46772              c = *++cp;
     46773            }
     46774          while (c >= L_('0') && c <= L_('9'));
     46775@@ -888,7 +902,7 @@
     46776        --expp;
     46777        --dig_no;
     46778        --int_no;
     46779-       ++exponent;
     46780+       exponent += base == 16 ? 4 : 1;
     46781       }
     46782     while (dig_no > 0 && exponent < 0);
     46783 
     46784diff -Naur glibc-2.5.orig/stdlib/tst-atof1.c glibc-2.5/stdlib/tst-atof1.c
     46785--- glibc-2.5.orig/stdlib/tst-atof1.c   1969-12-31 16:00:00.000000000 -0800
     46786+++ glibc-2.5/stdlib/tst-atof1.c        2007-01-12 10:07:19.000000000 -0800
     46787@@ -0,0 +1,19 @@
     46788+#include <stdio.h>
     46789+#include <stdlib.h>
     46790+#include <string.h>
     46791+
     46792+static int
     46793+do_test (void)
     46794+{
     46795+  char buf[100];
     46796+  snprintf (buf, sizeof (buf), "%g", atof ("0x10p-1"));
     46797+  if (strcmp (buf, "8") != 0)
     46798+    {
     46799+      printf ("got \"%s\", expected \"8\"\n", buf);
     46800+      return 1;
     46801+    }
     46802+  return 0;
     46803+}
     46804+
     46805+#define TEST_FUNCTION do_test ()
     46806+#include "../test-skeleton.c"
     46807diff -Naur glibc-2.5.orig/stdlib/tst-atof2.c glibc-2.5/stdlib/tst-atof2.c
     46808--- glibc-2.5.orig/stdlib/tst-atof2.c   1969-12-31 16:00:00.000000000 -0800
     46809+++ glibc-2.5/stdlib/tst-atof2.c        2007-01-12 10:07:19.000000000 -0800
     46810@@ -0,0 +1,55 @@
     46811+#include <stdio.h>
     46812+#include <stdlib.h>
     46813+#include <string.h>
     46814+
     46815+
     46816+static const struct
     46817+{
     46818+  const char *str;
     46819+  const char *expected;
     46820+} tests[] =
     46821+  {
     46822+    { "1e308", "1e+308" },
     46823+    { "100000000e300", "1e+308" },
     46824+    { "0x1p1023", "8.98847e+307" },
     46825+    { "0x1000p1011", "8.98847e+307" },
     46826+    { "0x1p1020", "1.12356e+307" },
     46827+    { "0x0.00001p1040", "1.12356e+307" },
     46828+    { "1e-307", "1e-307" },
     46829+    { "0.000001e-301", "1e-307" },
     46830+    { "0.0000001e-300", "1e-307" },
     46831+    { "0.00000001e-299", "1e-307" },
     46832+    { "1000000e-313", "1e-307" },
     46833+    { "10000000e-314", "1e-307" },
     46834+    { "100000000e-315", "1e-307" },
     46835+    { "0x1p-1021", "4.45015e-308" },
     46836+    { "0x1000p-1033", "4.45015e-308" },
     46837+    { "0x10000p-1037", "4.45015e-308" },
     46838+    { "0x0.001p-1009", "4.45015e-308" },
     46839+    { "0x0.0001p-1005", "4.45015e-308" },
     46840+  };
     46841+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     46842+
     46843+
     46844+static int
     46845+do_test (void)
     46846+{
     46847+  int status = 0;
     46848+
     46849+  for (int i = 0; i < NTESTS; ++i)
     46850+    {
     46851+      char buf[100];
     46852+      snprintf (buf, sizeof (buf), "%g", atof (tests[i].str));
     46853+      if (strcmp (buf, tests[i].expected) != 0)
     46854+       {
     46855+         printf ("%d: got \"%s\", expected \"%s\"\n",
     46856+                 i, buf, tests[i].expected);
     46857+         status = 1;
     46858+       }
     46859+    }
     46860+
     46861+  return status;
     46862+}
     46863+
     46864+#define TEST_FUNCTION do_test ()
     46865+#include "../test-skeleton.c"
     46866diff -Naur glibc-2.5.orig/stdlib/tst-makecontext.c glibc-2.5/stdlib/tst-makecontext.c
     46867--- glibc-2.5.orig/stdlib/tst-makecontext.c     1969-12-31 16:00:00.000000000 -0800
     46868+++ glibc-2.5/stdlib/tst-makecontext.c  2007-01-12 10:24:52.000000000 -0800
     46869@@ -0,0 +1,67 @@
     46870+/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
     46871+   This file is part of the GNU C Library.
     46872+
     46873+   The GNU C Library is free software; you can redistribute it and/or
     46874+   modify it under the terms of the GNU Lesser General Public
     46875+   License as published by the Free Software Foundation; either
     46876+   version 2.1 of the License, or (at your option) any later version.
     46877+
     46878+   The GNU C Library is distributed in the hope that it will be useful,
     46879+   but WITHOUT ANY WARRANTY; without even the implied warranty of
     46880+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     46881+   Lesser General Public License for more details.
     46882+
     46883+   You should have received a copy of the GNU Lesser General Public
     46884+   License along with the GNU C Library; if not, write to the Free
     46885+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     46886+   02111-1307 USA.  */
     46887+
     46888+#include <errno.h>
     46889+#include <stdlib.h>
     46890+#include <stdio.h>
     46891+#include <ucontext.h>
     46892+
     46893+ucontext_t ucp;
     46894+char st1[8192];
     46895+__thread int thr;
     46896+
     46897+void
     46898+cf (int i)
     46899+{
     46900+  if (i != 78 || thr != 94)
     46901+    {
     46902+      printf ("i %d thr %d\n", i, thr);
     46903+      exit (1);
     46904+    }
     46905+  exit (0);
     46906+}
     46907+
     46908+int
     46909+do_test (void)
     46910+{
     46911+  if (getcontext (&ucp) != 0)
     46912+    {
     46913+      if (errno == ENOSYS)
     46914+       {
     46915+         puts ("context handling not supported");
     46916+         return 0;
     46917+       }
     46918+
     46919+      puts ("getcontext failed");
     46920+      return 1;
     46921+    }
     46922+  thr = 94;
     46923+  ucp.uc_link = NULL;
     46924+  ucp.uc_stack.ss_sp = st1;
     46925+  ucp.uc_stack.ss_size = sizeof st1;
     46926+  makecontext (&ucp, (void (*) (void)) cf, 1, 78);
     46927+  if (setcontext (&ucp) != 0)
     46928+    {
     46929+      puts ("setcontext failed");
     46930+      return 1;
     46931+    }
     46932+  return 2;
     46933+}
     46934+
     46935+#define TEST_FUNCTION do_test ()
     46936+#include "../test-skeleton.c"
     46937diff -Naur glibc-2.5.orig/stdlib/tst-rand48-2.c glibc-2.5/stdlib/tst-rand48-2.c
     46938--- glibc-2.5.orig/stdlib/tst-rand48-2.c        1969-12-31 16:00:00.000000000 -0800
     46939+++ glibc-2.5/stdlib/tst-rand48-2.c     2007-01-12 09:52:07.000000000 -0800
     46940@@ -0,0 +1,113 @@
     46941+#include <stdint.h>
     46942+#include <stdio.h>
     46943+#include <stdlib.h>
     46944+#include <time.h>
     46945+
     46946+int
     46947+main (void)
     46948+{
     46949+  time_t t = time (NULL);
     46950+  int i, ret = 0;
     46951+  double d;
     46952+  long int l;
     46953+  struct drand48_data data;
     46954+  unsigned short int buf[3];
     46955+
     46956+  srand48 ((long int) t);
     46957+  for (i = 0; i < 50; i++)
     46958+    if ((d = drand48 ()) < 0.0 || d >= 1.0)
     46959+      {
     46960+        printf ("drand48 %d %g\n", i, d);
     46961+        ret = 1;
     46962+      }
     46963+
     46964+  srand48_r ((long int) t, &data);
     46965+  for (i = 0; i < 50; i++)
     46966+    if (drand48_r (&data, &d) != 0 || d < 0.0 || d >= 1.0)
     46967+      {
     46968+        printf ("drand48_r %d %g\n", i, d);
     46969+        ret = 1;
     46970+      }
     46971+
     46972+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     46973+  for (i = 0; i < 50; i++)
     46974+    if ((d = erand48 (buf)) < 0.0 || d >= 1.0)
     46975+      {
     46976+        printf ("erand48 %d %g\n", i, d);
     46977+        ret = 1;
     46978+      }
     46979+
     46980+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     46981+  for (i = 0; i < 50; i++)
     46982+    if (erand48_r (buf, &data, &d) != 0 || d < 0.0 || d >= 1.0)
     46983+      {
     46984+        printf ("erand48_r %d %g\n", i, d);
     46985+        ret = 1;
     46986+      }
     46987+
     46988+  srand48 ((long int) t);
     46989+  for (i = 0; i < 50; i++)
     46990+    if ((l = lrand48 ()) < 0 || l > INT32_MAX)
     46991+      {
     46992+        printf ("lrand48 %d %ld\n", i, l);
     46993+        ret = 1;
     46994+      }
     46995+
     46996+  srand48_r ((long int) t, &data);
     46997+  for (i = 0; i < 50; i++)
     46998+    if (lrand48_r (&data, &l) != 0 || l < 0 || l > INT32_MAX)
     46999+      {
     47000+        printf ("lrand48_r %d %ld\n", i, l);
     47001+        ret = 1;
     47002+      }
     47003+
     47004+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47005+  for (i = 0; i < 50; i++)
     47006+    if ((l = nrand48 (buf)) < 0 || l > INT32_MAX)
     47007+      {
     47008+        printf ("nrand48 %d %ld\n", i, l);
     47009+        ret = 1;
     47010+      }
     47011+
     47012+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47013+  for (i = 0; i < 50; i++)
     47014+    if (nrand48_r (buf, &data, &l) != 0 || l < 0 || l > INT32_MAX)
     47015+      {
     47016+        printf ("nrand48_r %d %ld\n", i, l);
     47017+        ret = 1;
     47018+      }
     47019+
     47020+  srand48 ((long int) t);
     47021+  for (i = 0; i < 50; i++)
     47022+    if ((l = mrand48 ()) < INT32_MIN || l > INT32_MAX)
     47023+      {
     47024+        printf ("mrand48 %d %ld\n", i, l);
     47025+        ret = 1;
     47026+      }
     47027+
     47028+  srand48_r ((long int) t, &data);
     47029+  for (i = 0; i < 50; i++)
     47030+    if (mrand48_r (&data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
     47031+      {
     47032+        printf ("mrand48_r %d %ld\n", i, l);
     47033+        ret = 1;
     47034+      }
     47035+
     47036+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47037+  for (i = 0; i < 50; i++)
     47038+    if ((l = jrand48 (buf)) < INT32_MIN || l > INT32_MAX)
     47039+      {
     47040+        printf ("jrand48 %d %ld\n", i, l);
     47041+        ret = 1;
     47042+      }
     47043+
     47044+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47045+  for (i = 0; i < 50; i++)
     47046+    if (jrand48_r (buf, &data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
     47047+      {
     47048+        printf ("jrand48_r %d %ld\n", i, l);
     47049+        ret = 1;
     47050+      }
     47051+
     47052+  return ret;
     47053+}
     47054diff -Naur glibc-2.5.orig/stdlib/tst-rand48.c glibc-2.5/stdlib/tst-rand48.c
     47055--- glibc-2.5.orig/stdlib/tst-rand48.c  2001-01-19 19:32:19.000000000 -0800
     47056+++ glibc-2.5/stdlib/tst-rand48.c       2007-01-12 09:52:07.000000000 -0800
     47057@@ -44,10 +44,10 @@
     47058     }
     47059 
     47060   l = mrand48 ();
     47061-  if (l != 0xa28c1003l)
     47062+  if (l != -0x5d73effdl)
     47063     {
     47064       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47065-             __LINE__ - 4, 0xa28c1003l, l);
     47066+             __LINE__ - 4, -0x5d73effdl, l);
     47067       result = 1;
     47068     }
     47069 
     47070@@ -60,10 +60,10 @@
     47071     }
     47072 
     47073   l = mrand48 ();
     47074-  if (l != 0x9e88f474l)
     47075+  if (l != -0x61770b8cl)
     47076     {
     47077       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47078-             __LINE__ - 4, 0x9e88f474l, l);
     47079+             __LINE__ - 4, -0x61770b8cl, l);
     47080       result = 1;
     47081     }
     47082 
     47083@@ -92,10 +92,10 @@
     47084     }
     47085 
     47086   l = mrand48 ();
     47087-  if (l != 0xeb7a1fa3l)
     47088+  if (l != -0x1485e05dl)
     47089     {
     47090       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47091-             __LINE__ - 4, 0xeb7a1fa3l, l);
     47092+             __LINE__ - 4, -0x1485e05dl, l);
     47093       result = 1;
     47094     }
     47095 
     47096@@ -171,10 +171,10 @@
     47097     }
     47098 
     47099   l = mrand48 ();
     47100-  if (l != 0xa28c1003l)
     47101+  if (l != -0x5d73effdl)
     47102     {
     47103       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47104-             __LINE__ - 4, 0xa28c1003l, l);
     47105+             __LINE__ - 4, -0x5d73effdl, l);
     47106       result = 1;
     47107     }
     47108 
     47109@@ -187,10 +187,10 @@
     47110     }
     47111 
     47112   l = mrand48 ();
     47113-  if (l != 0x9e88f474l)
     47114+  if (l != -0x61770b8cl)
     47115     {
     47116       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47117-             __LINE__ - 4, 0x9e88f474l, l);
     47118+             __LINE__ - 4, -0x61770b8cl, l);
     47119       result = 1;
     47120     }
     47121 
     47122@@ -231,10 +231,10 @@
     47123     }
     47124 
     47125   l = mrand48 ();
     47126-  if (l != 0xeb7a1fa3l)
     47127+  if (l != -0x1485e05dl)
     47128     {
     47129       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47130-             __LINE__ - 4, 0xeb7a1fa3l, l);
     47131+             __LINE__ - 4, -0x1485e05dl, l);
     47132       result = 1;
     47133     }
     47134 
     47135@@ -287,10 +287,10 @@
     47136     }
     47137 
     47138   l = jrand48 (xs);
     47139-  if (l != 0xf568c7a0l)
     47140+  if (l != -0xa973860l)
     47141     {
     47142       printf ("jrand48() in line %d failed: expected %lx, seen %lx\n",
     47143-             __LINE__ - 4, 0xf568c7a0l, l);
     47144+             __LINE__ - 4, -0xa973860l, l);
     47145       result = 1;
     47146     }
     47147 
     47148diff -Naur glibc-2.5.orig/stdlib/tst-strtod2.c glibc-2.5/stdlib/tst-strtod2.c
     47149--- glibc-2.5.orig/stdlib/tst-strtod2.c 1969-12-31 16:00:00.000000000 -0800
     47150+++ glibc-2.5/stdlib/tst-strtod2.c      2007-01-12 10:23:27.000000000 -0800
     47151@@ -0,0 +1,44 @@
     47152+#include <stdio.h>
     47153+#include <stdlib.h>
     47154+
     47155+struct test
     47156+{
     47157+  const char *str;
     47158+  double result;
     47159+  size_t offset;
     47160+} tests[] =
     47161+{
     47162+  { "0xy", 0.0, 1 },
     47163+  { "0x.y", 0.0, 1 },
     47164+  { "0x0.y", 0.0, 4 },
     47165+  { "0x.0y", 0.0, 4 },
     47166+  { ".y", 0.0, 0 },
     47167+  { "0.y", 0.0, 2 },
     47168+  { ".0y", 0.0, 2 }
     47169+};
     47170+
     47171+static int
     47172+do_test (void)
     47173+{
     47174+  int status = 0;
     47175+  for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
     47176+    {
     47177+      char *ep;
     47178+      double r = strtod (tests[i].str, &ep);
     47179+      if (r != tests[i].result)
     47180+       {
     47181+         printf ("test %zu r = %g, expect %g\n", i, r, tests[i].result);
     47182+         status = 1;
     47183+       }
     47184+      if (ep != tests[i].str + tests[i].offset)
     47185+       {
     47186+         printf ("test %zu strtod parsed %ju characters, expected %zu\n",
     47187+                 i, ep - tests[i].str, tests[i].offset);
     47188+         status = 1;
     47189+       }
     47190+    }
     47191+  return status;
     47192+}
     47193+
     47194+#define TEST_FUNCTION do_test ()
     47195+#include "../test-skeleton.c"
     47196diff -Naur glibc-2.5.orig/stdlib/tst-strtod3.c glibc-2.5/stdlib/tst-strtod3.c
     47197--- glibc-2.5.orig/stdlib/tst-strtod3.c 1969-12-31 16:00:00.000000000 -0800
     47198+++ glibc-2.5/stdlib/tst-strtod3.c      2007-01-12 10:07:19.000000000 -0800
     47199@@ -0,0 +1,55 @@
     47200+#include <locale.h>
     47201+#include <stdio.h>
     47202+#include <stdlib.h>
     47203+#include <string.h>
     47204+
     47205+static const struct
     47206+{
     47207+  const char *in;
     47208+  const char *out;
     47209+  double expected;
     47210+} tests[] =
     47211+  {
     47212+    { "000,,,e1", ",,,e1", 0.0 },
     47213+    { "000e1", "", 0.0 },
     47214+    { "000,1e1", ",1e1", 0.0 }
     47215+  };
     47216+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     47217+
     47218+
     47219+static int
     47220+do_test (void)
     47221+{
     47222+  if (setlocale (LC_ALL, "en_US.ISO-8859-1") == NULL)
     47223+    {
     47224+      puts ("could not set locale");
     47225+      return 1;
     47226+    }
     47227+
     47228+  int status = 0;
     47229+
     47230+  for (int i = 0; i < NTESTS; ++i)
     47231+    {
     47232+      char *ep;
     47233+      double r = __strtod_internal (tests[i].in, &ep, 1);
     47234+
     47235+      if (strcmp (ep, tests[i].out) != 0)
     47236+       {
     47237+         printf ("%d: got rest string \"%s\", expected \"%s\"\n",
     47238+                 i, ep, tests[i].out);
     47239+         status = 1;
     47240+       }
     47241+
     47242+      if (r != tests[i].expected)
     47243+       {
     47244+         printf ("%d: got wrong results %g, expected %g\n",
     47245+                 i, r, tests[i].expected);
     47246+         status = 1;
     47247+       }
     47248+    }
     47249+
     47250+  return status;
     47251+}
     47252+
     47253+#define TEST_FUNCTION do_test ()
     47254+#include "../test-skeleton.c"
     47255diff -Naur glibc-2.5.orig/stdlib/tst-strtod4.c glibc-2.5/stdlib/tst-strtod4.c
     47256--- glibc-2.5.orig/stdlib/tst-strtod4.c 1969-12-31 16:00:00.000000000 -0800
     47257+++ glibc-2.5/stdlib/tst-strtod4.c      2007-01-12 10:23:27.000000000 -0800
     47258@@ -0,0 +1,56 @@
     47259+#include <locale.h>
     47260+#include <stdio.h>
     47261+#include <stdlib.h>
     47262+#include <string.h>
     47263+
     47264+#define NBSP "\xc2\xa0"
     47265+
     47266+static const struct
     47267+{
     47268+  const char *in;
     47269+  const char *out;
     47270+  double expected;
     47271+} tests[] =
     47272+  {
     47273+    { "000"NBSP"000"NBSP"000", "", 0.0 },
     47274+    { "1"NBSP"000"NBSP"000,5x", "x", 1000000.5 }
     47275+  };
     47276+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     47277+
     47278+
     47279+static int
     47280+do_test (void)
     47281+{
     47282+  if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
     47283+    {
     47284+      puts ("could not set locale");
     47285+      return 1;
     47286+    }
     47287+
     47288+  int status = 0;
     47289+
     47290+  for (int i = 0; i < NTESTS; ++i)
     47291+    {
     47292+      char *ep;
     47293+      double r = __strtod_internal (tests[i].in, &ep, 1);
     47294+
     47295+      if (strcmp (ep, tests[i].out) != 0)
     47296+       {
     47297+         printf ("%d: got rest string \"%s\", expected \"%s\"\n",
     47298+                 i, ep, tests[i].out);
     47299+         status = 1;
     47300+       }
     47301+
     47302+      if (r != tests[i].expected)
     47303+       {
     47304+         printf ("%d: got wrong results %g, expected %g\n",
     47305+                 i, r, tests[i].expected);
     47306+         status = 1;
     47307+       }
     47308+    }
     47309+
     47310+  return status;
     47311+}
     47312+
     47313+#define TEST_FUNCTION do_test ()
     47314+#include "../test-skeleton.c"
     47315diff -Naur glibc-2.5.orig/string/Makefile glibc-2.5/string/Makefile
     47316--- glibc-2.5.orig/string/Makefile      2006-06-04 09:35:25.000000000 -0700
     47317+++ glibc-2.5/string/Makefile   2007-01-12 10:02:24.000000000 -0800
     47318@@ -1,4 +1,4 @@
     47319-# Copyright (C) 1991-2002, 2005, 2006 Free Software Foundation, Inc.
     47320+# Copyright (C) 1991-2002, 2005, 2006, 2007 Free Software Foundation, Inc.
     47321 # This file is part of the GNU C Library.
     47322 
     47323 # The GNU C Library is free software; you can redistribute it and/or
     47324@@ -54,7 +54,7 @@
     47325                   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap      \
     47326                   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry       \
     47327                   bug-strtok1 $(addprefix test-,$(strop-tests))        \
     47328-                  bug-envz1
     47329+                  bug-envz1 tst-strxfrm2
     47330 distribute     := memcopy.h pagecopy.h tst-svc.expect test-string.h
     47331 
     47332 
     47333@@ -64,6 +64,7 @@
     47334 inl-tester-ENV = LANGUAGE=C
     47335 noinl-tester-ENV = LANGUAGE=C
     47336 tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
     47337+tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
     47338 bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
     47339 CFLAGS-inl-tester.c = -fno-builtin
     47340 CFLAGS-noinl-tester.c = -fno-builtin
     47341diff -Naur glibc-2.5.orig/string/strxfrm_l.c glibc-2.5/string/strxfrm_l.c
     47342--- glibc-2.5.orig/string/strxfrm_l.c   2005-10-15 13:49:18.000000000 -0700
     47343+++ glibc-2.5/string/strxfrm_l.c        2007-01-12 10:02:24.000000000 -0800
     47344@@ -1,4 +1,5 @@
     47345-/* Copyright (C) 1995,96,97,2002, 2004, 2005 Free Software Foundation, Inc.
     47346+/* Copyright (C) 1995, 1996, 1997, 2002, 2004, 2005, 2006
     47347+   Free Software Foundation, Inc.
     47348    This file is part of the GNU C Library.
     47349    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
     47350 
     47351@@ -96,6 +97,7 @@
     47352   const int32_t *indirect;
     47353   uint_fast32_t pass;
     47354   size_t needed;
     47355+  size_t last_needed;
     47356   const USTRING_TYPE *usrc;
     47357   size_t srclen = STRLEN (src);
     47358   int32_t *idxarr;
     47359@@ -197,6 +199,7 @@
     47360         this is true for all of them.  */
     47361       int position = rule & sort_position;
     47362 
     47363+      last_needed = needed;
     47364       if (position == 0)
     47365        {
     47366          for (idxcnt = 0; idxcnt < idxmax; ++idxcnt)
     47367@@ -426,11 +429,11 @@
     47368      a `position' rule at the end and if no non-ignored character
     47369      is found the last \1 byte is immediately followed by a \0 byte
     47370      signalling this.  We can avoid the \1 byte(s).  */
     47371-  if (needed <= n && needed > 2 && dest[needed - 2] == L('\1'))
     47372+  if (needed > 2 && needed == last_needed + 1)
     47373     {
     47374       /* Remove the \1 byte.  */
     47375-      --needed;
     47376-      dest[needed - 1] = L('\0');
     47377+      if (--needed <= n)
     47378+       dest[needed - 1] = L('\0');
     47379     }
     47380 
     47381   /* Free the memory if needed.  */
     47382diff -Naur glibc-2.5.orig/string/tst-strxfrm2.c glibc-2.5/string/tst-strxfrm2.c
     47383--- glibc-2.5.orig/string/tst-strxfrm2.c        1969-12-31 16:00:00.000000000 -0800
     47384+++ glibc-2.5/string/tst-strxfrm2.c     2007-01-12 10:02:24.000000000 -0800
     47385@@ -0,0 +1,83 @@
     47386+#include <locale.h>
     47387+#include <stdio.h>
     47388+#include <string.h>
     47389+
     47390+static int
     47391+do_test (void)
     47392+{
     47393+  int res = 0;
     47394+
     47395+  char buf[20];
     47396+  size_t l1 = strxfrm (NULL, "ab", 0);
     47397+  size_t l2 = strxfrm (buf, "ab", 1);
     47398+  size_t l3 = strxfrm (buf, "ab", sizeof (buf));
     47399+  if (l3 < sizeof (buf) && strlen (buf) != l3)
     47400+    {
     47401+      puts ("C locale l3 test failed");
     47402+      res = 1;
     47403+    }
     47404+
     47405+  size_t l4 = strxfrm (buf, "ab", l1 + 1);
     47406+  if (l4 < l1 + 1 && strlen (buf) != l4)
     47407+    {
     47408+      puts ("C locale l4 test failed");
     47409+      res = 1;
     47410+    }
     47411+
     47412+  buf[l1] = 'Z';
     47413+  size_t l5 = strxfrm (buf, "ab", l1);
     47414+  if (buf[l1] != 'Z')
     47415+    {
     47416+      puts ("C locale l5 test failed");
     47417+      res = 1;
     47418+    }
     47419+
     47420+  if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
     47421+    {
     47422+      puts ("C locale retval test failed");
     47423+      res = 1;
     47424+    }
     47425+
     47426+  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
     47427+    {
     47428+      puts ("setlocale failed");
     47429+      res = 1;
     47430+    }
     47431+  else
     47432+    {
     47433+      l1 = strxfrm (NULL, "ab", 0);
     47434+      l2 = strxfrm (buf, "ab", 1);
     47435+      l3 = strxfrm (buf, "ab", sizeof (buf));
     47436+      if (l3 < sizeof (buf) && strlen (buf) != l3)
     47437+       {
     47438+         puts ("UTF-8 locale l3 test failed");
     47439+         res = 1;
     47440+       }
     47441+
     47442+      l4 = strxfrm (buf, "ab", l1 + 1);
     47443+      if (l4 < l1 + 1 && strlen (buf) != l4)
     47444+       {
     47445+         puts ("UTF-8 locale l4 test failed");
     47446+         res = 1;
     47447+       }
     47448+
     47449+      buf[l1] = 'Z';
     47450+      l5 = strxfrm (buf, "ab", l1);
     47451+      if (buf[l1] != 'Z')
     47452+       {
     47453+         puts ("UTF-8 locale l5 test failed");
     47454+         res = 1;
     47455+       }
     47456+
     47457+      if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
     47458+       {
     47459+         puts ("UTF-8 locale retval test failed");
     47460+         res = 1;
     47461+       }
     47462+    }
     47463+
     47464+  return res;
     47465+}
     47466+
     47467+#define TEST_FUNCTION do_test ()
     47468+#include "../test-skeleton.c"
    4599047469diff -Naur glibc-2.5.orig/sunrpc/Makefile glibc-2.5/sunrpc/Makefile
    4599147470--- glibc-2.5.orig/sunrpc/Makefile      2005-06-26 11:24:19.000000000 -0700
     
    4649247971 #define _PUSHARGS_6    pushl %ebp; cfi_adjust_cfa_offset (4); \
    4649347972                        cfi_rel_offset (ebp, 0); L(PUSHBP1): _PUSHARGS_5
     47973diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
     47974--- glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S      2006-01-06 19:51:11.000000000 -0800
     47975+++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S   2007-01-12 09:55:39.000000000 -0800
     47976@@ -26,9 +26,7 @@
     47977 
     47978 ENTRY(__makecontext)
     47979        /* Set up the first 7 args to the function in its registers */
     47980-       addi    r11,r3,_UC_REG_SPACE+12
     47981-       clrrwi  r11,r11,4
     47982-       stw     r11,_UC_REGS_PTR(r3)
     47983+       lwz     r11,_UC_REGS_PTR(r3)
     47984        stw     r6,_UC_GREGS+(PT_R3*4)(r11)
     47985        stw     r7,_UC_GREGS+(PT_R4*4)(r11)
     47986        stw     r8,_UC_GREGS+(PT_R5*4)(r11)
     47987diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
     47988--- glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S       2005-12-29 13:03:38.000000000 -0800
     47989+++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S    2007-01-12 09:55:39.000000000 -0800
     47990@@ -1,5 +1,5 @@
     47991 /* Jump to a new context.
     47992-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
     47993+   Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
     47994    This file is part of the GNU C Library.
     47995 
     47996    The GNU C Library is free software; you can redistribute it and/or
     47997@@ -20,6 +20,7 @@
     47998 #include <sysdep.h>
     47999 #include <rtld-global-offsets.h>
     48000 #include <shlib-compat.h>
     48001+#include <kernel-features.h>
     48002 
     48003 #define __ASSEMBLY__
     48004 #include <asm/ptrace.h>
    4649448005diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
    4649548006--- glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c        2006-08-14 22:27:23.000000000 -0700
Note: See TracChangeset for help on using the changeset viewer.