[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r8916 - in /trunk/libc: ./ hesiod/nss_hesiod/ include/ libio/ malloc/ nptl/ nptl/sysdeps/unix/sysv/linux/ nptl/sysdeps/unix/...



Author: joseph
Date: Thu Sep  3 07:33:58 2009
New Revision: 8916

Log:
Merge changes between r8878 and r8915 from /fsf/trunk.

Added:
    trunk/libc/libio/bug-wsetpos.c
      - copied unchanged from r8915, fsf/trunk/libc/libio/bug-wsetpos.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
      - copied unchanged from r8915, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
Modified:
    trunk/libc/ChangeLog
    trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
    trunk/libc/include/stdio.h
    trunk/libc/libio/Makefile
    trunk/libc/libio/iofflush.c
    trunk/libc/libio/wfileops.c
    trunk/libc/malloc/malloc.c
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
    trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c
    trunk/libc/stdlib/tst-strtol.c
    trunk/libc/stdlib/tst-strtoll.c
    trunk/libc/sysdeps/i386/i686/multiarch/init-arch.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
    trunk/libc/sysdeps/powerpc/powerpc32/power6/memcpy.S
    trunk/libc/sysdeps/x86_64/fpu/bits/mathinline.h
    trunk/libc/sysdeps/x86_64/multiarch/init-arch.c
    trunk/libc/sysdeps/x86_64/multiarch/s_fma.c
    trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c
    trunk/libc/sysdeps/x86_64/multiarch/strcasestr-c.c
    trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Thu Sep  3 07:33:58 2009
@@ -1,3 +1,86 @@
+2009-09-01  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* hesiod/nss_hesiod/hesiod-grp.c (internal_gid_from_group): Fix
+	parsing of group entry.
+
+2009-09-02  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* libio/wfileops.c (_IO_wfile_seekoff): Account for readahead in
+	external buffer.  Always discard readahead in internal buffer.
+	* libio/Makefile (tests): Add bug-wsetpos.
+	* libio/bug-wsetpos.c: New file.
+
+2009-09-02  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* sysdeps/x86_64/multiarch/strstr-c.c (__strstr_sse42, __strstr_sse2):
+	Add attribute_hidden.
+	* sysdeps/x86_64/multiarch/strcasestr-c.c (__strcasestr_sse42,
+	__strcasestr_sse2): Likewise.
+	* sysdeps/x86_64/multiarch/s_fma.c (__fma_sse2): Add attribute_hidden.
+	(__fma_fma): Make static.
+	* sysdeps/x86_64/multiarch/s_fmaf.c (__fmaf_sse2): Add attribute_hidden.
+	(__fmaf_fma): Make static.
+
+2009-08-31  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* libio/wfileops.c (_IO_wfile_seekoff): Remove dead code and
+	reformulate in-buffer optimisation check to match code in
+	_IO_new_file_seekoff.
+
+2009-08-31  Joshua W. Boyer  <jwboyer@xxxxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/power6/memcpy.S: Change srdi instruction
+	to srwi in 32-bit memcpy for power6.
+
+2009-09-01  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* include/stdio.h: Declare hidden proto for fflush.
+	* libio/iofflush.c: Add hidden weak alias for fflush.
+
+2009-09-01  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* sysdeps/x86_64/fpu/bits/mathinline.h: Include bits/wordsize.h.
+	(__signbitf, __signbit): Only use SSE inline asm for 64-bit.
+
+2009-08-31  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/x86_64/fpu/bits/mathinline.h: Use __asm instead of asm.
+
+2009-08-31  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #10560]
+	* malloc/malloc.c: Add local assert definition to avoid problems with
+	memory allocation in the real one.
+
+2009-08-27  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/init-arch.c (ENABLE_SSSE3_ON_ATOM):
+	Removed.
+	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Don't
+	turn off SSSE3 on Atom.
+
+2009-08-28  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* stdlib/tst-strtol.c (tests): More tests.
+	* stdlib/tst-strtoll.c (tests): Likewise.
+
+2009-08-26  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c: New file.
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c: New file.
+
+2009-08-25  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Add llround aliases.
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c: New file.
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: New file
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: New file.
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_round.c: New file.
+
 2009-08-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* math/s_fdiml.c (__fdiml): Use fpclassify instead of fpclassifyl.

Modified: trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
==============================================================================
--- trunk/libc/hesiod/nss_hesiod/hesiod-grp.c (original)
+++ trunk/libc/hesiod/nss_hesiod/hesiod-grp.c Thu Sep  3 07:33:58 2009
@@ -139,21 +139,19 @@
     {
       char *p = *grp_res;
 
+      /* Skip to third field.  */
       while (*p != '\0' && *p != ':')
 	++p;
-      while (*p != '\0' && *p == ':')
+      if (*p != '\0')
 	++p;
       while (*p != '\0' && *p != ':')
 	++p;
-      while (*p != '\0' && *p == ':')
-	++p;
-      if (*p == ':')
+      if (*p != '\0')
 	{
 	  char *endp;
 	  char *q = ++p;
 	  long int val;
 
-	  q = p;
 	  while (*q != '\0' && *q != ':')
 	    ++q;
 

Modified: trunk/libc/include/stdio.h
==============================================================================
--- trunk/libc/include/stdio.h (original)
+++ trunk/libc/include/stdio.h Thu Sep  3 07:33:58 2009
@@ -148,6 +148,7 @@
 libc_hidden_proto (fwrite)
 libc_hidden_proto (fseek)
 libc_hidden_proto (ftello)
+libc_hidden_proto (fflush)
 libc_hidden_proto (fflush_unlocked)
 libc_hidden_proto (fread_unlocked)
 libc_hidden_proto (fwrite_unlocked)

Modified: trunk/libc/libio/Makefile
==============================================================================
--- trunk/libc/libio/Makefile (original)
+++ trunk/libc/libio/Makefile Thu Sep  3 07:33:58 2009
@@ -76,7 +76,7 @@
      += bug-rewind bug-rewind2 bug-ungetwc1		\
 	bug-wfflush bug-wmemstream1 tst-fopenloc2	\
 	tst_getwc					\
-	tst_putwc tst_wprintf tst_wprintf2 tst_wscanf tst-fgetwc
+	tst_putwc tst_wprintf tst_wprintf2 tst_wscanf tst-fgetwc bug-wsetpos
 tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR)			\
      += tst_swprintf tst_swscanf			\
 	tst-sscanf					\

Modified: trunk/libc/libio/iofflush.c
==============================================================================
--- trunk/libc/libio/iofflush.c (original)
+++ trunk/libc/libio/iofflush.c Thu Sep  3 07:33:58 2009
@@ -49,6 +49,7 @@
 
 #ifdef weak_alias
 weak_alias (_IO_fflush, fflush)
+libc_hidden_weak (fflush)
 
 #ifndef _IO_MTSAFE_IO
 weak_alias (_IO_fflush, fflush_unlocked)

Modified: trunk/libc/libio/wfileops.c
==============================================================================
--- trunk/libc/libio/wfileops.c (original)
+++ trunk/libc/libio/wfileops.c Thu Sep  3 07:33:58 2009
@@ -631,8 +631,12 @@
       clen = (*cv->__codecvt_do_encoding) (cv);
 
       if (clen > 0)
-	offset -= (fp->_wide_data->_IO_read_end
-		   - fp->_wide_data->_IO_read_ptr) * clen;
+	{
+	  offset -= (fp->_wide_data->_IO_read_end
+		     - fp->_wide_data->_IO_read_ptr) * clen;
+	  /* Adjust by readahead in external buffer.  */
+	  offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+	}
       else
 	{
 	  int nread;
@@ -678,87 +682,27 @@
   if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
       && !_IO_in_backup (fp))
     {
-      /* Offset relative to start of main get area. */
-      _IO_off64_t rel_offset = (offset - fp->_offset
-				+ (fp->_IO_read_end - fp->_IO_read_base));
-      if (rel_offset >= 0)
-	{
-#if 0
-	  if (_IO_in_backup (fp))
-	    _IO_switch_to_main_get_area (fp);
-#endif
-	  if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
-	    {
-	      enum __codecvt_result status;
-	      struct _IO_codecvt *cd = fp->_codecvt;
-	      const char *read_ptr_copy;
-
-	      fp->_IO_read_ptr = fp->_IO_read_base + rel_offset;
-	      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
-
-	      /* Now set the pointer for the internal buffer.  This
-                 might be an iterative process.  Though the read
-                 pointer is somewhere in the current external buffer
-                 this does not mean we can convert this whole buffer
-                 at once fitting in the internal buffer.  */
-	      fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
-	      read_ptr_copy = fp->_IO_read_base;
-	      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
-	      do
-		{
-		  wchar_t buffer[1024];
-		  wchar_t *ignore;
-		  status = (*cd->__codecvt_do_in) (cd,
-						   &fp->_wide_data->_IO_state,
-						   read_ptr_copy,
-						   fp->_IO_read_ptr,
-						   &read_ptr_copy,
-						   buffer,
-						   buffer
-						   + (sizeof (buffer)
-						      / sizeof (buffer[0])),
-						   &ignore);
-		  if (status != __codecvt_ok && status != __codecvt_partial)
-		    {
-		      fp->_flags |= _IO_ERR_SEEN;
-		      goto dumb;
-		    }
-		}
-	      while (read_ptr_copy != fp->_IO_read_ptr);
-
-	      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
-
-	      _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
-	      goto resync;
-	    }
-#ifdef TODO
-	    /* If we have streammarkers, seek forward by reading ahead. */
-	    if (_IO_have_markers (fp))
-	      {
-		int to_skip = rel_offset
-		  - (fp->_IO_read_ptr - fp->_IO_read_base);
-		if (ignore (to_skip) != to_skip)
-		  goto dumb;
-		_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
-		goto resync;
-	      }
-#endif
-	}
-#ifdef TODO
-      if (rel_offset < 0 && rel_offset >= Bbase () - Bptr ())
-	{
-	  if (!_IO_in_backup (fp))
-	    _IO_switch_to_backup_area (fp);
-	  gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr);
+      _IO_off64_t start_offset = (fp->_offset
+				  - (fp->_IO_read_end - fp->_IO_buf_base));
+      if (offset >= start_offset && offset < fp->_offset)
+	{
+	  enum __codecvt_result status;
+	  struct _IO_codecvt *cd = fp->_codecvt;
+	  const char *read_ptr_copy;
+
+	  _IO_setg (fp, fp->_IO_buf_base,
+		    fp->_IO_buf_base + (offset - start_offset),
+		    fp->_IO_read_end);
+	  _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+	  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base);
+	  _IO_wsetp (fp, fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base);
 	  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
 	  goto resync;
 	}
-#endif
-    }
-
-#ifdef TODO
-  INTUSE(_IO_unsave_markers) (fp);
-#endif
+    }
 
   if (fp->_flags & _IO_NO_READS)
     goto dumb;
@@ -792,6 +736,9 @@
   _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + delta,
 	    fp->_IO_buf_base + count);
   _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
+	     fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
+  _IO_wsetp (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
   fp->_offset = result + count;
   _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
   return offset;

Modified: trunk/libc/malloc/malloc.c
==============================================================================
--- trunk/libc/malloc/malloc.c (original)
+++ trunk/libc/malloc/malloc.c Thu Sep  3 07:33:58 2009
@@ -107,7 +107,7 @@
        and status information.
 
   Minimum allocated size: 4-byte ptrs:  16 bytes    (including 4 overhead)
-                          8-byte ptrs:  24/32 bytes (including, 4/8 overhead)
+			  8-byte ptrs:  24/32 bytes (including, 4/8 overhead)
 
        When a chunk is freed, 12 (for 4byte ptrs) or 20 (for 8 byte
        ptrs but 4 byte size) or 24 (for 8/8) additional bytes are
@@ -126,7 +126,7 @@
        minimal mmap unit); typically 4096 or 8192 bytes.
 
   Maximum allocated size:  4-byte size_t: 2^32 minus about two pages
-                           8-byte size_t: 2^64 minus about two pages
+			   8-byte size_t: 2^64 minus about two pages
 
        It is assumed that (possibly signed) size_t values suffice to
        represent chunk sizes. `Possibly signed' is due to the fact
@@ -329,7 +329,29 @@
   or other mallocs available that do this.
 */
 
-#include <assert.h>
+#ifdef NDEBUG
+# define assert(expr) ((void) 0)
+#else
+# define assert(expr) \
+  ((expr)								      \
+   ? ((void) 0)								      \
+   : __malloc_assert (__STRING (expr), __FILE__, __LINE__, __func__))
+
+extern const char *__progname;
+
+static void
+__malloc_assert (const char *assertion, const char *file, unsigned int line,
+		 const char *function)
+{
+  (void) __fxprintf (NULL, "%s%s%s:%u: %s%sAssertion `%s' failed.\n",
+		     __progname, __progname[0] ? ": " : "",
+		     file, line,
+		     function ? function : "", function ? ": " : "",
+		     assertion);
+  fflush (stderr);
+  abort ();
+}
+#endif
 
 
 /*
@@ -1000,17 +1022,17 @@
   arena:     current total non-mmapped bytes allocated from system
   ordblks:   the number of free chunks
   smblks:    the number of fastbin blocks (i.e., small chunks that
-               have been freed but not use resused or consolidated)
+	       have been freed but not use resused or consolidated)
   hblks:     current number of mmapped regions
   hblkhd:    total bytes held in mmapped regions
   usmblks:   the maximum total allocated space. This will be greater
-                than current total if trimming has occurred.
+		than current total if trimming has occurred.
   fsmblks:   total bytes held in fastbin blocks
   uordblks:  current total allocated space (normal or mmapped)
   fordblks:  total free space
   keepcost:  the maximum number of bytes that could ideally be released
-               back to system via malloc_trim. ("ideally" means that
-               it ignores page restrictions etc.)
+	       back to system via malloc_trim. ("ideally" means that
+	       it ignores page restrictions etc.)
 
   Because these fields are ints, but internal bookkeeping may
   be kept as longs, the reported values may wrap around zero and
@@ -1817,17 +1839,17 @@
 
 
     chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Size of previous chunk, if allocated            | |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Size of chunk, in bytes                       |M|P|
+	    |             Size of previous chunk, if allocated            | |
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    |             Size of chunk, in bytes                       |M|P|
       mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             User data starts here...                          .
-            .                                                               .
-            .             (malloc_usable_size() bytes)                      .
-            .                                                               |
+	    |             User data starts here...                          .
+	    .                                                               .
+	    .             (malloc_usable_size() bytes)                      .
+	    .                                                               |
 nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Size of chunk                                     |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    |             Size of chunk                                     |
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 
     Where "chunk" is the front of the chunk for the purpose of most of
@@ -1841,20 +1863,20 @@
     Free chunks are stored in circular doubly-linked lists, and look like this:
 
     chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Size of previous chunk                            |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    |             Size of previous chunk                            |
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     `head:' |             Size of chunk, in bytes                         |P|
       mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Forward pointer to next chunk in list             |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Back pointer to previous chunk in list            |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-            |             Unused space (may be 0 bytes long)                .
-            .                                                               .
-            .                                                               |
+	    |             Forward pointer to next chunk in list             |
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    |             Back pointer to previous chunk in list            |
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    |             Unused space (may be 0 bytes long)                .
+	    .                                                               .
+	    .                                                               |
 nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     `foot:' |             Size of chunk, in bytes                           |
-            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
     The P (PREV_INUSE) bit, stored in the unused low-order bit of the
     chunk size (which is always a multiple of two words), is an in-use
@@ -1875,14 +1897,14 @@
     The two exceptions to all this are
 
      1. The special chunk `top' doesn't bother using the
-        trailing size field since there is no next contiguous chunk
-        that would have to index off it. After initialization, `top'
-        is forced to always exist.  If it would become less than
-        MINSIZE bytes long, it is replenished.
+	trailing size field since there is no next contiguous chunk
+	that would have to index off it. After initialization, `top'
+	is forced to always exist.  If it would become less than
+	MINSIZE bytes long, it is replenished.
 
      2. Chunks allocated via mmap, which have the second-lowest-order
-        bit M (IS_MMAPPED) set in their size fields.  Because they are
-        allocated one-by-one, each must contain its own trailing size field.
+	bit M (IS_MMAPPED) set in their size fields.  Because they are
+	allocated one-by-one, each must contain its own trailing size field.
 
 */
 
@@ -2155,7 +2177,7 @@
  ((((unsigned long)(sz)) >> 12) <= 10)? 110 + (((unsigned long)(sz)) >> 12): \
  ((((unsigned long)(sz)) >> 15) <=  4)? 119 + (((unsigned long)(sz)) >> 15): \
  ((((unsigned long)(sz)) >> 18) <=  2)? 124 + (((unsigned long)(sz)) >> 18): \
-                                        126)
+					126)
 
 // XXX It remains to be seen whether it is good to keep the widths of
 // XXX the buckets the same or whether it should be scaled by a factor
@@ -2166,7 +2188,7 @@
  ((((unsigned long)(sz)) >> 12) <= 10)? 110 + (((unsigned long)(sz)) >> 12): \
  ((((unsigned long)(sz)) >> 15) <=  4)? 119 + (((unsigned long)(sz)) >> 15): \
  ((((unsigned long)(sz)) >> 18) <=  2)? 124 + (((unsigned long)(sz)) >> 18): \
-                                        126)
+					126)
 
 #define largebin_index(sz) \
   (SIZE_SZ == 8 ? largebin_index_64 (sz) : largebin_index_32 (sz))
@@ -2592,8 +2614,8 @@
     /* Has legal address ... */
     if (p != av->top) {
       if (contiguous(av)) {
-        assert(((char*)p) >= min_address);
-        assert(((char*)p + sz) <= ((char*)(av->top)));
+	assert(((char*)p) >= min_address);
+	assert(((char*)p + sz) <= ((char*)(av->top)));
       }
     }
     else {
@@ -2850,9 +2872,9 @@
       unsigned int binbit = get_binmap(av,i);
       int empty = last(b) == b;
       if (!binbit)
-        assert(empty);
+	assert(empty);
       else if (!empty)
-        assert(binbit);
+	assert(binbit);
     }
 
     for (p = last(b); p != b; p = p->bk) {
@@ -2861,12 +2883,12 @@
       size = chunksize(p);
       total += size;
       if (i >= 2) {
-        /* chunk belongs in bin */
-        idx = bin_index(size);
-        assert(idx == i);
-        /* lists are sorted */
-        assert(p->bk == b ||
-               (unsigned long)chunksize(p->bk) >= (unsigned long)chunksize(p));
+	/* chunk belongs in bin */
+	idx = bin_index(size);
+	assert(idx == i);
+	/* lists are sorted */
+	assert(p->bk == b ||
+	       (unsigned long)chunksize(p->bk) >= (unsigned long)chunksize(p));
 
 	if (!in_smallbin_range(size))
 	  {
@@ -2894,10 +2916,10 @@
 	assert (p->fd_nextsize == NULL && p->bk_nextsize == NULL);
       /* chunk is followed by a legal chain of inuse chunks */
       for (q = next_chunk(p);
-           (q != av->top && inuse(q) &&
-             (unsigned long)(chunksize(q)) >= MINSIZE);
-           q = next_chunk(q))
-        do_check_inuse_chunk(av, q);
+	   (q != av->top && inuse(q) &&
+	     (unsigned long)(chunksize(q)) >= MINSIZE);
+	   q = next_chunk(q))
+	do_check_inuse_chunk(av, q);
     }
   }
 
@@ -2913,14 +2935,14 @@
   assert(mp_.n_mmaps <= mp_.max_n_mmaps);
 
   assert((unsigned long)(av->system_mem) <=
-         (unsigned long)(av->max_system_mem));
+	 (unsigned long)(av->max_system_mem));
 
   assert((unsigned long)(mp_.mmapped_mem) <=
-         (unsigned long)(mp_.max_mmapped_mem));
+	 (unsigned long)(mp_.max_mmapped_mem));
 
 #ifdef NO_THREADS
   assert((unsigned long)(mp_.max_total_mem) >=
-         (unsigned long)(mp_.mmapped_mem) + (unsigned long)(av->system_mem));
+	 (unsigned long)(mp_.mmapped_mem) + (unsigned long)(av->system_mem));
 #endif
 }
 #endif
@@ -3005,51 +3027,51 @@
 
       if (mm != MAP_FAILED) {
 
-        /*
-          The offset to the start of the mmapped region is stored
-          in the prev_size field of the chunk. This allows us to adjust
-          returned start address to meet alignment requirements here
-          and in memalign(), and still be able to compute proper
-          address argument for later munmap in free() and realloc().
-        */
+	/*
+	  The offset to the start of the mmapped region is stored
+	  in the prev_size field of the chunk. This allows us to adjust
+	  returned start address to meet alignment requirements here
+	  and in memalign(), and still be able to compute proper
+	  address argument for later munmap in free() and realloc().
+	*/
 
 #if 1
 	/* For glibc, chunk2mem increases the address by 2*SIZE_SZ and
 	   MALLOC_ALIGN_MASK is 2*SIZE_SZ-1.  Each mmap'ed area is page
 	   aligned and therefore definitely MALLOC_ALIGN_MASK-aligned.  */
-        assert (((INTERNAL_SIZE_T)chunk2mem(mm) & MALLOC_ALIGN_MASK) == 0);
-#else
-        front_misalign = (INTERNAL_SIZE_T)chunk2mem(mm) & MALLOC_ALIGN_MASK;
-        if (front_misalign > 0) {
-          correction = MALLOC_ALIGNMENT - front_misalign;
-          p = (mchunkptr)(mm + correction);
-          p->prev_size = correction;
-          set_head(p, (size - correction) |IS_MMAPPED);
-        }
-        else
+	assert (((INTERNAL_SIZE_T)chunk2mem(mm) & MALLOC_ALIGN_MASK) == 0);
+#else
+	front_misalign = (INTERNAL_SIZE_T)chunk2mem(mm) & MALLOC_ALIGN_MASK;
+	if (front_misalign > 0) {
+	  correction = MALLOC_ALIGNMENT - front_misalign;
+	  p = (mchunkptr)(mm + correction);
+	  p->prev_size = correction;
+	  set_head(p, (size - correction) |IS_MMAPPED);
+	}
+	else
 #endif
 	  {
 	    p = (mchunkptr)mm;
 	    set_head(p, size|IS_MMAPPED);
 	  }
 
-        /* update statistics */
-
-        if (++mp_.n_mmaps > mp_.max_n_mmaps)
-          mp_.max_n_mmaps = mp_.n_mmaps;
-
-        sum = mp_.mmapped_mem += size;
-        if (sum > (unsigned long)(mp_.max_mmapped_mem))
-          mp_.max_mmapped_mem = sum;
+	/* update statistics */
+
+	if (++mp_.n_mmaps > mp_.max_n_mmaps)
+	  mp_.max_n_mmaps = mp_.n_mmaps;
+
+	sum = mp_.mmapped_mem += size;
+	if (sum > (unsigned long)(mp_.max_mmapped_mem))
+	  mp_.max_mmapped_mem = sum;
 #ifdef NO_THREADS
-        sum += av->system_mem;
-        if (sum > (unsigned long)(mp_.max_total_mem))
-          mp_.max_total_mem = sum;
-#endif
-
-        check_chunk(av, p);
-
-        return chunk2mem(p);
+	sum += av->system_mem;
+	if (sum > (unsigned long)(mp_.max_total_mem))
+	  mp_.max_total_mem = sum;
+#endif
+
+	check_chunk(av, p);
+
+	return chunk2mem(p);
       }
     }
   }
@@ -3069,8 +3091,8 @@
   */
 
   assert((old_top == initial_top(av) && old_size == 0) ||
-         ((unsigned long) (old_size) >= MINSIZE &&
-          prev_inuse(old_top) &&
+	 ((unsigned long) (old_size) >= MINSIZE &&
+	  prev_inuse(old_top) &&
 	  ((unsigned long)old_end & pagemask) == 0));
 
   /* Precondition: not enough current space to satisfy nb request */
@@ -3096,7 +3118,7 @@
       arena_mem += old_heap->size - old_heap_size;
 #if 0
       if(mmapped_mem + arena_mem + sbrked_mem > max_total_mem)
-        max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
+	max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
 #endif
       set_head(old_top, (((char *)old_heap + old_heap->size) - (char *)old_top)
 	       | PREV_INUSE);
@@ -3205,17 +3227,17 @@
 
       if (mbrk != MAP_FAILED) {
 
-        /* We do not need, and cannot use, another sbrk call to find end */
-        brk = mbrk;
-        snd_brk = brk + size;
-
-        /*
-           Record that we no longer have a contiguous sbrk region.
-           After the first time mmap is used as backup, we do not
-           ever rely on contiguous space since this could incorrectly
-           bridge regions.
-        */
-        set_noncontiguous(av);
+	/* We do not need, and cannot use, another sbrk call to find end */
+	brk = mbrk;
+	snd_brk = brk + size;
+
+	/*
+	   Record that we no longer have a contiguous sbrk region.
+	   After the first time mmap is used as backup, we do not
+	   ever rely on contiguous space since this could incorrectly
+	   bridge regions.
+	*/
+	set_noncontiguous(av);
       }
     }
 #endif
@@ -3242,19 +3264,19 @@
       Otherwise, make adjustments:
 
       * If the first time through or noncontiguous, we need to call sbrk
-        just to find out where the end of memory lies.
+	just to find out where the end of memory lies.
 
       * We need to ensure that all returned chunks from malloc will meet
-        MALLOC_ALIGNMENT
+	MALLOC_ALIGNMENT
 
       * If there was an intervening foreign sbrk, we need to adjust sbrk
-        request size to account for fact that we will not be able to
-        combine new space with existing space in old_top.
+	request size to account for fact that we will not be able to
+	combine new space with existing space in old_top.
 
       * Almost all systems internally allocate whole pages at a time, in
-        which case we might as well use the whole last page of request.
-        So we allocate enough more memory to hit a page boundary now,
-        which in turn causes future contiguous calls to page-align.
+	which case we might as well use the whole last page of request.
+	So we allocate enough more memory to hit a page boundary now,
+	which in turn causes future contiguous calls to page-align.
     */
 
     else {
@@ -3270,51 +3292,51 @@
 	if (old_size)
 	  av->system_mem += brk - old_end;
 
-        /* Guarantee alignment of first new chunk made from this space */
-
-        front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK;
-        if (front_misalign > 0) {
-
-          /*
-            Skip over some bytes to arrive at an aligned position.
-            We don't need to specially mark these wasted front bytes.
-            They will never be accessed anyway because
-            prev_inuse of av->top (and any chunk created from its start)
-            is always true after initialization.
-          */
-
-          correction = MALLOC_ALIGNMENT - front_misalign;
-          aligned_brk += correction;
-        }
-
-        /*
-          If this isn't adjacent to existing space, then we will not
-          be able to merge with old_top space, so must add to 2nd request.
-        */
-
-        correction += old_size;
-
-        /* Extend the end address to hit a page boundary */
-        end_misalign = (INTERNAL_SIZE_T)(brk + size + correction);
-        correction += ((end_misalign + pagemask) & ~pagemask) - end_misalign;
-
-        assert(correction >= 0);
-        snd_brk = (char*)(MORECORE(correction));
-
-        /*
-          If can't allocate correction, try to at least find out current
-          brk.  It might be enough to proceed without failing.
-
-          Note that if second sbrk did NOT fail, we assume that space
-          is contiguous with first sbrk. This is a safe assumption unless
-          program is multithreaded but doesn't use locks and a foreign sbrk
-          occurred between our first and second calls.
-        */
-
-        if (snd_brk == (char*)(MORECORE_FAILURE)) {
-          correction = 0;
-          snd_brk = (char*)(MORECORE(0));
-        } else {
+	/* Guarantee alignment of first new chunk made from this space */
+
+	front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK;
+	if (front_misalign > 0) {
+
+	  /*
+	    Skip over some bytes to arrive at an aligned position.
+	    We don't need to specially mark these wasted front bytes.
+	    They will never be accessed anyway because
+	    prev_inuse of av->top (and any chunk created from its start)
+	    is always true after initialization.
+	  */
+
+	  correction = MALLOC_ALIGNMENT - front_misalign;
+	  aligned_brk += correction;
+	}
+
+	/*
+	  If this isn't adjacent to existing space, then we will not
+	  be able to merge with old_top space, so must add to 2nd request.
+	*/
+
+	correction += old_size;
+
+	/* Extend the end address to hit a page boundary */
+	end_misalign = (INTERNAL_SIZE_T)(brk + size + correction);
+	correction += ((end_misalign + pagemask) & ~pagemask) - end_misalign;
+
+	assert(correction >= 0);
+	snd_brk = (char*)(MORECORE(correction));
+
+	/*
+	  If can't allocate correction, try to at least find out current
+	  brk.  It might be enough to proceed without failing.
+
+	  Note that if second sbrk did NOT fail, we assume that space
+	  is contiguous with first sbrk. This is a safe assumption unless
+	  program is multithreaded but doesn't use locks and a foreign sbrk
+	  occurred between our first and second calls.
+	*/
+
+	if (snd_brk == (char*)(MORECORE_FAILURE)) {
+	  correction = 0;
+	  snd_brk = (char*)(MORECORE(0));
+	} else {
 	  /* Call the `morecore' hook if necessary.  */
 	  void (*hook) (void) = force_reg (__after_morecore_hook);
 	  if (__builtin_expect (hook != NULL, 0))
@@ -3324,61 +3346,61 @@
 
       /* handle non-contiguous cases */
       else {
-        /* MORECORE/mmap must correctly align */
-        assert(((unsigned long)chunk2mem(brk) & MALLOC_ALIGN_MASK) == 0);
-
-        /* Find out current end of memory */
-        if (snd_brk == (char*)(MORECORE_FAILURE)) {
-          snd_brk = (char*)(MORECORE(0));
-        }
+	/* MORECORE/mmap must correctly align */
+	assert(((unsigned long)chunk2mem(brk) & MALLOC_ALIGN_MASK) == 0);
+
+	/* Find out current end of memory */
+	if (snd_brk == (char*)(MORECORE_FAILURE)) {
+	  snd_brk = (char*)(MORECORE(0));
+	}
       }
 
       /* Adjust top based on results of second sbrk */
       if (snd_brk != (char*)(MORECORE_FAILURE)) {
-        av->top = (mchunkptr)aligned_brk;
-        set_head(av->top, (snd_brk - aligned_brk + correction) | PREV_INUSE);
-        av->system_mem += correction;
-
-        /*
-          If not the first time through, we either have a
-          gap due to foreign sbrk or a non-contiguous region.  Insert a
-          double fencepost at old_top to prevent consolidation with space
-          we don't own. These fenceposts are artificial chunks that are
-          marked as inuse and are in any case too small to use.  We need
-          two to make sizes and alignments work out.
-        */
-
-        if (old_size != 0) {
-          /*
-             Shrink old_top to insert fenceposts, keeping size a
-             multiple of MALLOC_ALIGNMENT. We know there is at least
-             enough space in old_top to do this.
-          */
-          old_size = (old_size - 4*SIZE_SZ) & ~MALLOC_ALIGN_MASK;
-          set_head(old_top, old_size | PREV_INUSE);
-
-          /*
-            Note that the following assignments completely overwrite
-            old_top when old_size was previously MINSIZE.  This is
-            intentional. We need the fencepost, even if old_top otherwise gets
-            lost.
-          */
-          chunk_at_offset(old_top, old_size            )->size =
-            (2*SIZE_SZ)|PREV_INUSE;
-
-          chunk_at_offset(old_top, old_size + 2*SIZE_SZ)->size =
-            (2*SIZE_SZ)|PREV_INUSE;
-
-          /* If possible, release the rest. */
-          if (old_size >= MINSIZE) {
+	av->top = (mchunkptr)aligned_brk;
+	set_head(av->top, (snd_brk - aligned_brk + correction) | PREV_INUSE);
+	av->system_mem += correction;
+
+	/*
+	  If not the first time through, we either have a
+	  gap due to foreign sbrk or a non-contiguous region.  Insert a
+	  double fencepost at old_top to prevent consolidation with space
+	  we don't own. These fenceposts are artificial chunks that are
+	  marked as inuse and are in any case too small to use.  We need
+	  two to make sizes and alignments work out.
+	*/
+
+	if (old_size != 0) {
+	  /*
+	     Shrink old_top to insert fenceposts, keeping size a
+	     multiple of MALLOC_ALIGNMENT. We know there is at least
+	     enough space in old_top to do this.
+	  */
+	  old_size = (old_size - 4*SIZE_SZ) & ~MALLOC_ALIGN_MASK;
+	  set_head(old_top, old_size | PREV_INUSE);
+
+	  /*
+	    Note that the following assignments completely overwrite
+	    old_top when old_size was previously MINSIZE.  This is
+	    intentional. We need the fencepost, even if old_top otherwise gets
+	    lost.
+	  */
+	  chunk_at_offset(old_top, old_size            )->size =
+	    (2*SIZE_SZ)|PREV_INUSE;
+
+	  chunk_at_offset(old_top, old_size + 2*SIZE_SZ)->size =
+	    (2*SIZE_SZ)|PREV_INUSE;
+
+	  /* If possible, release the rest. */
+	  if (old_size >= MINSIZE) {
 #ifdef ATOMIC_FASTBINS
-            _int_free(av, old_top, 1);
-#else
-            _int_free(av, old_top);
-#endif
-          }
-
-        }
+	    _int_free(av, old_top, 1);
+#else
+	    _int_free(av, old_top);
+#endif
+	  }
+
+	}
       }
     }
 
@@ -3456,13 +3478,13 @@
     if (current_brk == (char*)(av->top) + top_size) {
 
       /*
-        Attempt to release memory. We ignore MORECORE return value,
-        and instead call again to find out where new end of memory is.
-        This avoids problems if first call releases less than we asked,
-        of if failure somehow altered brk value. (We could still
-        encounter problems if it altered brk in some very bad way,
-        but the only thing we can do is adjust anyway, which will cause
-        some downstream failure.)
+	Attempt to release memory. We ignore MORECORE return value,
+	and instead call again to find out where new end of memory is.
+	This avoids problems if first call releases less than we asked,
+	of if failure somehow altered brk value. (We could still
+	encounter problems if it altered brk in some very bad way,
+	but the only thing we can do is adjust anyway, which will cause
+	some downstream failure.)
       */
 
       MORECORE(-extra);
@@ -3473,15 +3495,15 @@
       new_brk = (char*)(MORECORE(0));
 
       if (new_brk != (char*)MORECORE_FAILURE) {
-        released = (long)(current_brk - new_brk);
-
-        if (released != 0) {
-          /* Success. Adjust top. */
-          av->system_mem -= released;
-          set_head(av->top, (top_size - released) | PREV_INUSE);
-          check_malloc_state(av);
-          return 1;
-        }
+	released = (long)(current_brk - new_brk);
+
+	if (released != 0) {
+	  /* Success. Adjust top. */
+	  av->system_mem -= released;
+	  set_head(av->top, (top_size - released) | PREV_INUSE);
+	  check_malloc_state(av);
+	  return 1;
+	}
       }
     }
   }
@@ -3559,7 +3581,7 @@
     return p;
 
   cp = (char *)mremap((char *)p - offset, size + offset, new_size,
-                      MREMAP_MAYMOVE);
+		      MREMAP_MAYMOVE);
 
   if (cp == MAP_FAILED) return 0;
 
@@ -3650,8 +3672,8 @@
       ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
       (void)mutex_unlock(&main_arena.mutex);
       if(ar_ptr) {
-        victim = _int_malloc(ar_ptr, bytes);
-        (void)mutex_unlock(&ar_ptr->mutex);
+	victim = _int_malloc(ar_ptr, bytes);
+	(void)mutex_unlock(&ar_ptr->mutex);
       }
 #endif
     }
@@ -3689,7 +3711,7 @@
     /* see if the dynamic brk/mmap threshold needs adjusting */
     if (!mp_.no_dyn_threshold
 	&& p->size > mp_.mmap_threshold
-        && p->size <= DEFAULT_MMAP_THRESHOLD_MAX)
+	&& p->size <= DEFAULT_MMAP_THRESHOLD_MAX)
       {
 	mp_.mmap_threshold = chunksize (p);
 	mp_.trim_threshold = 2 * mp_.mmap_threshold;
@@ -3871,8 +3893,8 @@
       (void)mutex_unlock(&ar_ptr->mutex);
       ar_ptr = arena_get2(prev, bytes);
       if(ar_ptr) {
-        p = _int_memalign(ar_ptr, alignment, bytes);
-        (void)mutex_unlock(&ar_ptr->mutex);
+	p = _int_memalign(ar_ptr, alignment, bytes);
+	(void)mutex_unlock(&ar_ptr->mutex);
       }
 #endif
     }
@@ -3919,8 +3941,8 @@
       /* ... or sbrk() has failed and there is still a chance to mmap() */
       ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
       if(ar_ptr) {
-        p = _int_memalign(ar_ptr, pagesz, bytes);
-        (void)mutex_unlock(&ar_ptr->mutex);
+	p = _int_memalign(ar_ptr, pagesz, bytes);
+	(void)mutex_unlock(&ar_ptr->mutex);
       }
 #endif
     }
@@ -3965,8 +3987,8 @@
       ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0,
 			  bytes + 2*pagesz + MINSIZE);
       if(ar_ptr) {
-        p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
-        (void)mutex_unlock(&ar_ptr->mutex);
+	p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
+	(void)mutex_unlock(&ar_ptr->mutex);
       }
 #endif
     }
@@ -4059,8 +4081,8 @@
       av = arena_get2(av->next ? av : 0, sz);
       (void)mutex_unlock(&main_arena.mutex);
       if(av) {
-        mem = _int_malloc(av, sz);
-        (void)mutex_unlock(&av->mutex);
+	mem = _int_malloc(av, sz);
+	(void)mutex_unlock(&av->mutex);
       }
 #endif
     }
@@ -4308,21 +4330,21 @@
 
     if ( (victim = last(bin)) != bin) {
       if (victim == 0) /* initialization check */
-        malloc_consolidate(av);
+	malloc_consolidate(av);
       else {
-        bck = victim->bk;
+	bck = victim->bk;
 	if (__builtin_expect (bck->fd != victim, 0))
 	  {
 	    errstr = "malloc(): smallbin double linked list corrupted";
 	    goto errout;
 	  }
-        set_inuse_bit_at_offset(victim, nb);
-        bin->bk = bck;
-        bck->fd = bin;
-
-        if (av != &main_arena)
+	set_inuse_bit_at_offset(victim, nb);
+	bin->bk = bck;
+	bck->fd = bin;
+
+	if (av != &main_arena)
 	  victim->size |= NON_MAIN_ARENA;
-        check_malloced_chunk(av, victim, nb);
+	check_malloced_chunk(av, victim, nb);
 	void *p = chunk2mem(victim);
 	if (__builtin_expect (perturb_byte, 0))
 	  alloc_perturb (p, bytes);
@@ -4373,36 +4395,36 @@
       size = chunksize(victim);
 
       /*
-         If a small request, try to use last remainder if it is the
-         only chunk in unsorted bin.  This helps promote locality for
-         runs of consecutive small requests. This is the only
-         exception to best-fit, and applies only when there is
-         no exact fit for a small chunk.
+	 If a small request, try to use last remainder if it is the
+	 only chunk in unsorted bin.  This helps promote locality for
+	 runs of consecutive small requests. This is the only
+	 exception to best-fit, and applies only when there is
+	 no exact fit for a small chunk.
       */
 
       if (in_smallbin_range(nb) &&
-          bck == unsorted_chunks(av) &&
-          victim == av->last_remainder &&
-          (unsigned long)(size) > (unsigned long)(nb + MINSIZE)) {
-
-        /* split and reattach remainder */
-        remainder_size = size - nb;
-        remainder = chunk_at_offset(victim, nb);
-        unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder;
-        av->last_remainder = remainder;
-        remainder->bk = remainder->fd = unsorted_chunks(av);
+	  bck == unsorted_chunks(av) &&
+	  victim == av->last_remainder &&
+	  (unsigned long)(size) > (unsigned long)(nb + MINSIZE)) {
+
+	/* split and reattach remainder */
+	remainder_size = size - nb;
+	remainder = chunk_at_offset(victim, nb);
+	unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder;
+	av->last_remainder = remainder;
+	remainder->bk = remainder->fd = unsorted_chunks(av);
 	if (!in_smallbin_range(remainder_size))
 	  {
 	    remainder->fd_nextsize = NULL;
 	    remainder->bk_nextsize = NULL;
 	  }
 
-        set_head(victim, nb | PREV_INUSE |
+	set_head(victim, nb | PREV_INUSE |
 		 (av != &main_arena ? NON_MAIN_ARENA : 0));
-        set_head(remainder, remainder_size | PREV_INUSE);
-        set_foot(remainder, remainder_size);
-
-        check_malloced_chunk(av, victim, nb);
+	set_head(remainder, remainder_size | PREV_INUSE);
+	set_foot(remainder, remainder_size);
+
+	check_malloced_chunk(av, victim, nb);
 	void *p = chunk2mem(victim);
 	if (__builtin_expect (perturb_byte, 0))
 	  alloc_perturb (p, bytes);
@@ -4416,10 +4438,10 @@
       /* Take now instead of binning if exact fit */
 
       if (size == nb) {
-        set_inuse_bit_at_offset(victim, size);
+	set_inuse_bit_at_offset(victim, size);
 	if (av != &main_arena)
 	  victim->size |= NON_MAIN_ARENA;
-        check_malloced_chunk(av, victim, nb);
+	check_malloced_chunk(av, victim, nb);
 	void *p = chunk2mem(victim);
 	if (__builtin_expect (perturb_byte, 0))
 	  alloc_perturb (p, bytes);
@@ -4429,30 +4451,30 @@
       /* place chunk in bin */
 
       if (in_smallbin_range(size)) {
-        victim_index = smallbin_index(size);
-        bck = bin_at(av, victim_index);
-        fwd = bck->fd;
+	victim_index = smallbin_index(size);
+	bck = bin_at(av, victim_index);
+	fwd = bck->fd;
       }
       else {
-        victim_index = largebin_index(size);
-        bck = bin_at(av, victim_index);
-        fwd = bck->fd;
-
-        /* maintain large bins in sorted order */
-        if (fwd != bck) {
+	victim_index = largebin_index(size);
+	bck = bin_at(av, victim_index);
+	fwd = bck->fd;
+
+	/* maintain large bins in sorted order */
+	if (fwd != bck) {
 	  /* Or with inuse bit to speed comparisons */
-          size |= PREV_INUSE;
-          /* if smaller than smallest, bypass loop below */
+	  size |= PREV_INUSE;
+	  /* if smaller than smallest, bypass loop below */
 	  assert((bck->bk->size & NON_MAIN_ARENA) == 0);
 	  if ((unsigned long)(size) < (unsigned long)(bck->bk->size)) {
-            fwd = bck;
-            bck = bck->bk;
+	    fwd = bck;
+	    bck = bck->bk;
 
 	    victim->fd_nextsize = fwd->fd;
 	    victim->bk_nextsize = fwd->fd->bk_nextsize;
 	    fwd->fd->bk_nextsize = victim->bk_nextsize->fd_nextsize = victim;
-          }
-          else {
+	  }
+	  else {
 	    assert((fwd->size & NON_MAIN_ARENA) == 0);
 	    while ((unsigned long) size < fwd->size)
 	      {
@@ -4471,7 +4493,7 @@
 		victim->bk_nextsize->fd_nextsize = victim;
 	      }
 	    bck = fwd->bk;
-          }
+	  }
 	} else
 	  victim->fd_nextsize = victim->bk_nextsize = victim;
       }
@@ -4497,32 +4519,32 @@
 
       /* skip scan if empty or largest chunk is too small */
       if ((victim = first(bin)) != bin &&
-          (unsigned long)(victim->size) >= (unsigned long)(nb)) {
+	  (unsigned long)(victim->size) >= (unsigned long)(nb)) {
 
 	victim = victim->bk_nextsize;
-        while (((unsigned long)(size = chunksize(victim)) <
-                (unsigned long)(nb)))
-          victim = victim->bk_nextsize;
+	while (((unsigned long)(size = chunksize(victim)) <
+		(unsigned long)(nb)))
+	  victim = victim->bk_nextsize;
 
 	/* Avoid removing the first entry for a size so that the skip
 	   list does not have to be rerouted.  */
 	if (victim != last(bin) && victim->size == victim->fd->size)
 	  victim = victim->fd;
 
-        remainder_size = size - nb;
-        unlink(victim, bck, fwd);
-
-        /* Exhaust */
-        if (remainder_size < MINSIZE)  {
-          set_inuse_bit_at_offset(victim, size);
+	remainder_size = size - nb;
+	unlink(victim, bck, fwd);
+
+	/* Exhaust */
+	if (remainder_size < MINSIZE)  {
+	  set_inuse_bit_at_offset(victim, size);
 	  if (av != &main_arena)
 	    victim->size |= NON_MAIN_ARENA;
-        }
-        /* Split */
-        else {
-          remainder = chunk_at_offset(victim, nb);
-          /* We cannot assume the unsorted list is empty and therefore
-             have to perform a complete insert here.  */
+	}
+	/* Split */
+	else {
+	  remainder = chunk_at_offset(victim, nb);
+	  /* We cannot assume the unsorted list is empty and therefore
+	     have to perform a complete insert here.  */
 	  bck = unsorted_chunks(av);
 	  fwd = bck->fd;
 	  if (__builtin_expect (fwd->bk != bck, 0))
@@ -4539,11 +4561,11 @@
 	      remainder->fd_nextsize = NULL;
 	      remainder->bk_nextsize = NULL;
 	    }
-          set_head(victim, nb | PREV_INUSE |
+	  set_head(victim, nb | PREV_INUSE |
 		   (av != &main_arena ? NON_MAIN_ARENA : 0));
-          set_head(remainder, remainder_size | PREV_INUSE);
-          set_foot(remainder, remainder_size);
-        }
+	  set_head(remainder, remainder_size | PREV_INUSE);
+	  set_foot(remainder, remainder_size);
+	}
 	check_malloced_chunk(av, victim, nb);
 	void *p = chunk2mem(victim);
 	if (__builtin_expect (perturb_byte, 0))
@@ -4573,20 +4595,20 @@
 
       /* Skip rest of block if there are no more set bits in this block.  */
       if (bit > map || bit == 0) {
-        do {
-          if (++block >= BINMAPSIZE)  /* out of bins */
-            goto use_top;
-        } while ( (map = av->binmap[block]) == 0);
-
-        bin = bin_at(av, (block << BINMAPSHIFT));
-        bit = 1;
+	do {
+	  if (++block >= BINMAPSIZE)  /* out of bins */
+	    goto use_top;
+	} while ( (map = av->binmap[block]) == 0);
+
+	bin = bin_at(av, (block << BINMAPSHIFT));
+	bit = 1;
       }
 
       /* Advance to bin with set bit. There must be one. */
       while ((bit & map) == 0) {
-        bin = next_bin(bin);
-        bit <<= 1;
-        assert(bit != 0);
+	bin = next_bin(bin);
+	bit <<= 1;
+	assert(bit != 0);
       }
 
       /* Inspect the bin. It is likely to be non-empty */
@@ -4594,32 +4616,32 @@
 
       /*  If a false alarm (empty bin), clear the bit. */
       if (victim == bin) {
-        av->binmap[block] = map &= ~bit; /* Write through */
-        bin = next_bin(bin);
-        bit <<= 1;
+	av->binmap[block] = map &= ~bit; /* Write through */
+	bin = next_bin(bin);
+	bit <<= 1;
       }
 
       else {
-        size = chunksize(victim);
-
-        /*  We know the first chunk in this bin is big enough to use. */
-        assert((unsigned long)(size) >= (unsigned long)(nb));
-
-        remainder_size = size - nb;
-
-        /* unlink */
-        unlink(victim, bck, fwd);
-
-        /* Exhaust */
-        if (remainder_size < MINSIZE) {
-          set_inuse_bit_at_offset(victim, size);
+	size = chunksize(victim);
+
+	/*  We know the first chunk in this bin is big enough to use. */
+	assert((unsigned long)(size) >= (unsigned long)(nb));
+
+	remainder_size = size - nb;
+
+	/* unlink */
+	unlink(victim, bck, fwd);
+
+	/* Exhaust */
+	if (remainder_size < MINSIZE) {
+	  set_inuse_bit_at_offset(victim, size);
 	  if (av != &main_arena)
 	    victim->size |= NON_MAIN_ARENA;
-        }
-
-        /* Split */
-        else {
-          remainder = chunk_at_offset(victim, nb);
+	}
+
+	/* Split */
+	else {
+	  remainder = chunk_at_offset(victim, nb);
 
 	  /* We cannot assume the unsorted list is empty and therefore
 	     have to perform a complete insert here.  */
@@ -4635,19 +4657,19 @@
 	  bck->fd = remainder;
 	  fwd->bk = remainder;
 
-          /* advertise as last remainder */
-          if (in_smallbin_range(nb))
-            av->last_remainder = remainder;
+	  /* advertise as last remainder */
+	  if (in_smallbin_range(nb))
+	    av->last_remainder = remainder;
 	  if (!in_smallbin_range(remainder_size))
 	    {
 	      remainder->fd_nextsize = NULL;
 	      remainder->bk_nextsize = NULL;
 	    }
-          set_head(victim, nb | PREV_INUSE |
+	  set_head(victim, nb | PREV_INUSE |
 		   (av != &main_arena ? NON_MAIN_ARENA : 0));
-          set_head(remainder, remainder_size | PREV_INUSE);
-          set_foot(remainder, remainder_size);
-        }
+	  set_head(remainder, remainder_size | PREV_INUSE);
+	  set_foot(remainder, remainder_size);
+	}
 	check_malloced_chunk(av, victim, nb);
 	void *p = chunk2mem(victim);
 	if (__builtin_expect (perturb_byte, 0))
@@ -5104,53 +5126,53 @@
 #ifndef ATOMIC_FASTBINS
 	*fb = 0;
 #endif
-        do {
-          check_inuse_chunk(av, p);
-          nextp = p->fd;
-
-          /* Slightly streamlined version of consolidation code in free() */
-          size = p->size & ~(PREV_INUSE|NON_MAIN_ARENA);
-          nextchunk = chunk_at_offset(p, size);
-          nextsize = chunksize(nextchunk);
-
-          if (!prev_inuse(p)) {
-            prevsize = p->prev_size;
-            size += prevsize;
-            p = chunk_at_offset(p, -((long) prevsize));
-            unlink(p, bck, fwd);
-          }
-
-          if (nextchunk != av->top) {
-            nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
-
-            if (!nextinuse) {
-              size += nextsize;
-              unlink(nextchunk, bck, fwd);
-            } else
+	do {
+	  check_inuse_chunk(av, p);
+	  nextp = p->fd;
+
+	  /* Slightly streamlined version of consolidation code in free() */
+	  size = p->size & ~(PREV_INUSE|NON_MAIN_ARENA);
+	  nextchunk = chunk_at_offset(p, size);
+	  nextsize = chunksize(nextchunk);
+
+	  if (!prev_inuse(p)) {
+	    prevsize = p->prev_size;
+	    size += prevsize;
+	    p = chunk_at_offset(p, -((long) prevsize));
+	    unlink(p, bck, fwd);
+	  }
+
+	  if (nextchunk != av->top) {
+	    nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
+
+	    if (!nextinuse) {
+	      size += nextsize;
+	      unlink(nextchunk, bck, fwd);
+	    } else
 	      clear_inuse_bit_at_offset(nextchunk, 0);
 
-            first_unsorted = unsorted_bin->fd;
-            unsorted_bin->fd = p;
-            first_unsorted->bk = p;
-
-            if (!in_smallbin_range (size)) {
+	    first_unsorted = unsorted_bin->fd;
+	    unsorted_bin->fd = p;
+	    first_unsorted->bk = p;
+
+	    if (!in_smallbin_range (size)) {
 	      p->fd_nextsize = NULL;
 	      p->bk_nextsize = NULL;
 	    }
 
-            set_head(p, size | PREV_INUSE);
-            p->bk = unsorted_bin;
-            p->fd = first_unsorted;
-            set_foot(p, size);
-          }
-
-          else {
-            size += nextsize;
-            set_head(p, size | PREV_INUSE);
-            av->top = p;
-          }
-
-        } while ( (p = nextp) != 0);
+	    set_head(p, size | PREV_INUSE);
+	    p->bk = unsorted_bin;
+	    p->fd = first_unsorted;
+	    set_foot(p, size);
+	  }
+
+	  else {
+	    size += nextsize;
+	    set_head(p, size | PREV_INUSE);
+	    av->top = p;
+	  }
+
+	} while ( (p = nextp) != 0);
 
       }
     } while (fb++ != maxfb);
@@ -5226,82 +5248,82 @@
     else {
       /* Try to expand forward into top */
       if (next == av->top &&
-          (unsigned long)(newsize = oldsize + nextsize) >=
-          (unsigned long)(nb + MINSIZE)) {
-        set_head_size(oldp, nb | (av != &main_arena ? NON_MAIN_ARENA : 0));
-        av->top = chunk_at_offset(oldp, nb);
-        set_head(av->top, (newsize - nb) | PREV_INUSE);
+	  (unsigned long)(newsize = oldsize + nextsize) >=
+	  (unsigned long)(nb + MINSIZE)) {
+	set_head_size(oldp, nb | (av != &main_arena ? NON_MAIN_ARENA : 0));
+	av->top = chunk_at_offset(oldp, nb);
+	set_head(av->top, (newsize - nb) | PREV_INUSE);
 	check_inuse_chunk(av, oldp);
-        return chunk2mem(oldp);
+	return chunk2mem(oldp);
       }
 
       /* Try to expand forward into next chunk;  split off remainder below */
       else if (next != av->top &&
-               !inuse(next) &&
-               (unsigned long)(newsize = oldsize + nextsize) >=
-               (unsigned long)(nb)) {
-        newp = oldp;
-        unlink(next, bck, fwd);
+	       !inuse(next) &&
+	       (unsigned long)(newsize = oldsize + nextsize) >=
+	       (unsigned long)(nb)) {
+	newp = oldp;
+	unlink(next, bck, fwd);
       }
 
       /* allocate, copy, free */
       else {
-        newmem = _int_malloc(av, nb - MALLOC_ALIGN_MASK);
-        if (newmem == 0)
-          return 0; /* propagate failure */
-
-        newp = mem2chunk(newmem);
-        newsize = chunksize(newp);
-
-        /*
-          Avoid copy if newp is next chunk after oldp.
-        */
-        if (newp == next) {
-          newsize += oldsize;
-          newp = oldp;
-        }
-        else {
-          /*
-            Unroll copy of <= 36 bytes (72 if 8byte sizes)
-            We know that contents have an odd number of
-            INTERNAL_SIZE_T-sized words; minimally 3.
-          */
-
-          copysize = oldsize - SIZE_SZ;
-          s = (INTERNAL_SIZE_T*)(chunk2mem(oldp));
-          d = (INTERNAL_SIZE_T*)(newmem);
-          ncopies = copysize / sizeof(INTERNAL_SIZE_T);
-          assert(ncopies >= 3);
-
-          if (ncopies > 9)
-            MALLOC_COPY(d, s, copysize);
-
-          else {
-            *(d+0) = *(s+0);
-            *(d+1) = *(s+1);
-            *(d+2) = *(s+2);
-            if (ncopies > 4) {
-              *(d+3) = *(s+3);
-              *(d+4) = *(s+4);
-              if (ncopies > 6) {
-                *(d+5) = *(s+5);
-                *(d+6) = *(s+6);
-                if (ncopies > 8) {
-                  *(d+7) = *(s+7);
-                  *(d+8) = *(s+8);
-                }
-              }
-            }
-          }
+	newmem = _int_malloc(av, nb - MALLOC_ALIGN_MASK);
+	if (newmem == 0)
+	  return 0; /* propagate failure */
+
+	newp = mem2chunk(newmem);
+	newsize = chunksize(newp);
+
+	/*
+	  Avoid copy if newp is next chunk after oldp.
+	*/
+	if (newp == next) {
+	  newsize += oldsize;
+	  newp = oldp;
+	}
+	else {
+	  /*
+	    Unroll copy of <= 36 bytes (72 if 8byte sizes)
+	    We know that contents have an odd number of
+	    INTERNAL_SIZE_T-sized words; minimally 3.
+	  */
+
+	  copysize = oldsize - SIZE_SZ;
+	  s = (INTERNAL_SIZE_T*)(chunk2mem(oldp));
+	  d = (INTERNAL_SIZE_T*)(newmem);
+	  ncopies = copysize / sizeof(INTERNAL_SIZE_T);
+	  assert(ncopies >= 3);
+
+	  if (ncopies > 9)
+	    MALLOC_COPY(d, s, copysize);
+
+	  else {
+	    *(d+0) = *(s+0);
+	    *(d+1) = *(s+1);
+	    *(d+2) = *(s+2);
+	    if (ncopies > 4) {
+	      *(d+3) = *(s+3);
+	      *(d+4) = *(s+4);
+	      if (ncopies > 6) {
+		*(d+5) = *(s+5);
+		*(d+6) = *(s+6);
+		if (ncopies > 8) {
+		  *(d+7) = *(s+7);
+		  *(d+8) = *(s+8);
+		}
+	      }
+	    }
+	  }
 
 #ifdef ATOMIC_FASTBINS
-          _int_free(av, oldp, 1);
-#else
-          _int_free(av, oldp);
-#endif
-          check_inuse_chunk(av, newp);
-          return chunk2mem(newp);
-        }
+	  _int_free(av, oldp, 1);
+#else
+	  _int_free(av, oldp);
+#endif
+	  check_inuse_chunk(av, newp);
+	  return chunk2mem(newp);
+	}
       }
     }
 
@@ -5367,11 +5389,11 @@
       /* update statistics */
       sum = mp_.mmapped_mem += newsize - oldsize;
       if (sum > (unsigned long)(mp_.max_mmapped_mem))
-        mp_.max_mmapped_mem = sum;
+	mp_.max_mmapped_mem = sum;
 #ifdef NO_THREADS
       sum += main_arena.system_mem;
       if (sum > (unsigned long)(mp_.max_total_mem))
-        mp_.max_total_mem = sum;
+	mp_.max_total_mem = sum;
 #endif
 
       return chunk2mem(newp);
@@ -5385,11 +5407,11 @@
       /* Must alloc, copy, free. */
       newmem = _int_malloc(av, nb - MALLOC_ALIGN_MASK);
       if (newmem != 0) {
-        MALLOC_COPY(newmem, chunk2mem(oldp), oldsize - 2*SIZE_SZ);
+	MALLOC_COPY(newmem, chunk2mem(oldp), oldsize - 2*SIZE_SZ);
 #ifdef ATOMIC_FASTBINS
-        _int_free(av, oldp, 1);
-#else
-        _int_free(av, oldp);
+	_int_free(av, oldp, 1);
+#else
+	_int_free(av, oldp);
 #endif
       }
     }
@@ -5465,7 +5487,7 @@
     */
 
     brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) &
-                           -((signed long) alignment));
+			   -((signed long) alignment));
     if ((unsigned long)(brk - (char*)(p)) < MINSIZE)
       brk += alignment;
 
@@ -5493,7 +5515,7 @@
     p = newp;
 
     assert (newsize >= nb &&
-            (((unsigned long)(chunk2mem(p))) % alignment) == 0);
+	    (((unsigned long)(chunk2mem(p))) % alignment) == 0);
   }
 
   /* Also give back spare room at the end */
@@ -5543,9 +5565,9 @@
 #endif
     {
       /*
-        Unroll clear of <= 36 bytes (72 if 8byte sizes)
-        We know that contents have an odd number of
-        INTERNAL_SIZE_T-sized words; minimally 3.
+	Unroll clear of <= 36 bytes (72 if 8byte sizes)
+	We know that contents have an odd number of
+	INTERNAL_SIZE_T-sized words; minimally 3.
       */
 
       d = (INTERNAL_SIZE_T*)mem;
@@ -5554,24 +5576,24 @@
       assert(nclears >= 3);
 
       if (nclears > 9)
-        MALLOC_ZERO(d, clearsize);
+	MALLOC_ZERO(d, clearsize);
 
       else {
-        *(d+0) = 0;
-        *(d+1) = 0;
-        *(d+2) = 0;
-        if (nclears > 4) {
-          *(d+3) = 0;
-          *(d+4) = 0;
-          if (nclears > 6) {
-            *(d+5) = 0;
-            *(d+6) = 0;
-            if (nclears > 8) {
-              *(d+7) = 0;
-              *(d+8) = 0;
-            }
-          }
-        }
+	*(d+0) = 0;
+	*(d+1) = 0;
+	*(d+2) = 0;
+	if (nclears > 4) {
+	  *(d+3) = 0;
+	  *(d+4) = 0;
+	  if (nclears > 6) {
+	    *(d+5) = 0;
+	    *(d+6) = 0;
+	    if (nclears > 8) {
+	      *(d+7) = 0;
+	      *(d+8) = 0;
+	    }
+	  }
+	}
       }
     }
   }
@@ -5714,9 +5736,9 @@
     marray[i] = chunk2mem(p);
     if (i != n_elements-1) {
       if (element_size != 0)
-        size = element_size;
+	size = element_size;
       else
-        size = request2size(sizes[i]);
+	size = request2size(sizes[i]);
       remainder_size -= size;
       set_head(p, size | size_flags);
       p = chunk_at_offset(p, size);
@@ -5804,9 +5826,9 @@
   for (int i = 1; i < NBINS; ++i)
     if (i == 1 || i >= psindex)
       {
-        mbinptr bin = bin_at (av, i);
-
-        for (mchunkptr p = last (bin); p != bin; p = p->bk)
+	mbinptr bin = bin_at (av, i);
+
+	for (mchunkptr p = last (bin); p != bin; p = p->bk)
 	  {
 	    INTERNAL_SIZE_T size = chunksize (p);
 
@@ -5989,7 +6011,7 @@
   fprintf(stderr, "locked in loop   = %10ld\n", stat_lock_loop);
   fprintf(stderr, "locked waiting   = %10ld\n", stat_lock_wait);
   fprintf(stderr, "locked total     = %10ld\n",
-          stat_lock_direct + stat_lock_loop + stat_lock_wait);
+	  stat_lock_direct + stat_lock_loop + stat_lock_wait);
 #endif
 #ifdef _LIBC
   ((_IO_FILE *) stderr)->_flags2 |= old_flags2;
@@ -6178,12 +6200,12 @@
     if (size > 0)
     {
       if (size < MINIMUM_MORECORE_SIZE)
-         size = MINIMUM_MORECORE_SIZE;
+	 size = MINIMUM_MORECORE_SIZE;
       if (CurrentExecutionLevel() == kTaskLevel)
-         ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
+	 ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
       if (ptr == 0)
       {
-        return (void *) MORECORE_FAILURE;
+	return (void *) MORECORE_FAILURE;
       }
       // save ptrs so they can be freed during cleanup
       our_os_pools[next_os_pool] = ptr;
@@ -6213,8 +6235,8 @@
     for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++)
       if (*ptr)
       {
-         PoolDeallocate(*ptr);
-         *ptr = 0;
+	 PoolDeallocate(*ptr);
+	 *ptr = 0;
       }
   }
 

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Thu Sep  3 07:33:58 2009
@@ -1,3 +1,16 @@
+2009-09-02  Suzuki K P  <suzuki@xxxxxxxxxx>
+	    Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #7094]
+	* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
+	Initialize the sigev_notify field for newly created timer to make sure
+	the timer gets deleted from the active timer's list upon timer_delete.
+
+2009-08-27  Andrew Stubbs  <ams@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
+	Correct a logic error.
+
 2009-08-25  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value

Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S Thu Sep  3 07:33:58 2009
@@ -52,7 +52,7 @@
 #  define LOAD_PRIVATE_FUTEX_WAIT(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, reg	; \
-	add	reg, tmp 	; \
+	add	reg, tmp	; \
 	bra	98f		; \
 	 mov.l	@tmp, reg	; \
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
@@ -61,7 +61,7 @@
 #  define LOAD_PRIVATE_FUTEX_WAIT(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, reg	; \
-	add	reg, tmp 	; \
+	add	reg, tmp	; \
 	mov.l	@tmp, reg	; \
 	bra	98f		; \
 	 mov	#FUTEX_WAIT, tmp ; \
@@ -71,7 +71,7 @@
 # define LOAD_PRIVATE_FUTEX_WAKE(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, reg	; \
-	add	reg, tmp 	; \
+	add	reg, tmp	; \
 	mov.l	@tmp, reg	; \
 	bra	98f		; \
 	 mov	#FUTEX_WAKE, tmp ; \
@@ -81,7 +81,7 @@
 #  define LOAD_FUTEX_WAIT(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, tmp2	; \
-	add	tmp2, tmp 	; \
+	add	tmp2, tmp	; \
 	mov.l	@tmp, tmp2	; \
 	bra	98f		; \
 	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
@@ -93,7 +93,7 @@
 #  define LOAD_FUTEX_WAIT(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, tmp2	; \
-	add	tmp2, tmp 	; \
+	add	tmp2, tmp	; \
 	mov.l	@tmp, tmp2	; \
 	bra	98f		; \
 	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
@@ -107,7 +107,7 @@
 # define LOAD_FUTEX_WAIT_ABS(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, tmp2	; \
-	add	tmp2, tmp 	; \
+	add	tmp2, tmp	; \
 	mov.l	@tmp, tmp2	; \
 	bra	98f		; \
 	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
@@ -123,7 +123,7 @@
 # define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
 	stc	gbr, tmp	; \
 	mov.w	99f, tmp2	; \
-	add	tmp2, tmp 	; \
+	add	tmp2, tmp	; \
 	mov.l	@tmp, tmp2	; \
 	bra	98f		; \
 	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
@@ -253,7 +253,7 @@
 	mov	#2, r6
 	cmp/eq	r6, r2
 	bf/s	2f
-	 mov	r2, r6
+	 mov	r6, r2
 
 1:
 	mov	#2, r6
@@ -327,7 +327,7 @@
 
 	tst	r3, r3
 	bt	6f
-	
+
 1:
 	/* Get current time.  */
 	mov	r15, r4

Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c Thu Sep  3 07:33:58 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003,2004, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2003.
 

Modified: trunk/libc/stdlib/tst-strtol.c
==============================================================================
--- trunk/libc/stdlib/tst-strtol.c (original)
+++ trunk/libc/stdlib/tst-strtol.c Thu Sep  3 07:33:58 2009
@@ -64,6 +64,148 @@
   {"-2147483648", 0x80000000, 0, 0, 0},
   {"-2147483649", 0x80000000, 0, 0, ERANGE},
   {"0x1122334455z", 2147483647, 16, 'z', ERANGE},
+
+  {"1111111111111111111111111111111", 2147483647, 2, 0, 0},
+  {"10000000000000000000000000000000", 2147483647, 2, 0, ERANGE},
+  {"12112122212110202101", 2147483647, 3, 0, 0},
+  {"12112122212110202102", 2147483647, 3, 0, ERANGE},
+  {"1333333333333333", 2147483647, 4, 0, 0},
+  {"2000000000000000", 2147483647, 4, 0, ERANGE},
+  {"13344223434042", 2147483647, 5, 0, 0},
+  {"13344223434043", 2147483647, 5, 0, ERANGE},
+  {"553032005531", 2147483647, 6, 0, 0},
+  {"553032005532", 2147483647, 6, 0, ERANGE},
+  {"104134211161", 2147483647, 7, 0, 0},
+  {"104134211162", 2147483647, 7, 0, ERANGE},
+  {"17777777777", 2147483647, 8, 0, 0},
+  {"20000000000", 2147483647, 8, 0, ERANGE},
+  {"5478773671", 2147483647, 9, 0, 0},
+  {"5478773672", 2147483647, 9, 0, ERANGE},
+  {"2147483647", 2147483647, 10, 0, 0},
+  {"2147483648", 2147483647, 10, 0, ERANGE},
+  {"a02220281", 2147483647, 11, 0, 0},
+  {"a02220282", 2147483647, 11, 0, ERANGE},
+  {"4bb2308a7", 2147483647, 12, 0, 0},
+  {"4bb2308a8", 2147483647, 12, 0, ERANGE},
+  {"282ba4aaa", 2147483647, 13, 0, 0},
+  {"282ba4aab", 2147483647, 13, 0, ERANGE},
+  {"1652ca931", 2147483647, 14, 0, 0},
+  {"1652ca932", 2147483647, 14, 0, ERANGE},
+  {"c87e66b7", 2147483647, 15, 0, 0},
+  {"c87e66b8", 2147483647, 15, 0, ERANGE},
+  {"7fffffff", 2147483647, 16, 0, 0},
+  {"80000000", 2147483647, 16, 0, ERANGE},
+  {"53g7f548", 2147483647, 17, 0, 0},
+  {"53g7f549", 2147483647, 17, 0, ERANGE},
+  {"3928g3h1", 2147483647, 18, 0, 0},
+  {"3928g3h2", 2147483647, 18, 0, ERANGE},
+  {"27c57h32", 2147483647, 19, 0, 0},
+  {"27c57h33", 2147483647, 19, 0, ERANGE},
+  {"1db1f927", 2147483647, 20, 0, 0},
+  {"1db1f928", 2147483647, 20, 0, ERANGE},
+  {"140h2d91", 2147483647, 21, 0, 0},
+  {"140h2d92", 2147483647, 21, 0, ERANGE},
+  {"ikf5bf1", 2147483647, 22, 0, 0},
+  {"ikf5bf2", 2147483647, 22, 0, ERANGE},
+  {"ebelf95", 2147483647, 23, 0, 0},
+  {"ebelf96", 2147483647, 23, 0, ERANGE},
+  {"b5gge57", 2147483647, 24, 0, 0},
+  {"b5gge58", 2147483647, 24, 0, ERANGE},
+  {"8jmdnkm", 2147483647, 25, 0, 0},
+  {"8jmdnkn", 2147483647, 25, 0, ERANGE},
+  {"6oj8ion", 2147483647, 26, 0, 0},
+  {"6oj8ioo", 2147483647, 26, 0, ERANGE},
+  {"5ehncka", 2147483647, 27, 0, 0},
+  {"5ehnckb", 2147483647, 27, 0, ERANGE},
+  {"4clm98f", 2147483647, 28, 0, 0},
+  {"4clm98g", 2147483647, 28, 0, ERANGE},
+  {"3hk7987", 2147483647, 29, 0, 0},
+  {"3hk7988", 2147483647, 29, 0, ERANGE},
+  {"2sb6cs7", 2147483647, 30, 0, 0},
+  {"2sb6cs8", 2147483647, 30, 0, ERANGE},
+  {"2d09uc1", 2147483647, 31, 0, 0},
+  {"2d09uc2", 2147483647, 31, 0, ERANGE},
+  {"1vvvvvv", 2147483647, 32, 0, 0},
+  {"2000000", 2147483647, 32, 0, ERANGE},
+  {"1lsqtl1", 2147483647, 33, 0, 0},
+  {"1lsqtl2", 2147483647, 33, 0, ERANGE},
+  {"1d8xqrp", 2147483647, 34, 0, 0},
+  {"1d8xqrq", 2147483647, 34, 0, ERANGE},
+  {"15v22um", 2147483647, 35, 0, 0},
+  {"15v22un", 2147483647, 35, 0, ERANGE},
+  {"zik0zj", 2147483647, 36, 0, 0},
+  {"zik0zk", 2147483647, 36, 0, ERANGE},
+
+  {"-10000000000000000000000000000000", -2147483648, 2, 0, 0},
+  {"-10000000000000000000000000000001", -2147483648, 2, 0, ERANGE},
+  {"-12112122212110202102", -2147483648, 3, 0, 0},
+  {"-12112122212110202110", -2147483648, 3, 0, ERANGE},
+  {"-2000000000000000", -2147483648, 4, 0, 0},
+  {"-2000000000000001", -2147483648, 4, 0, ERANGE},
+  {"-13344223434043", -2147483648, 5, 0, 0},
+  {"-13344223434044", -2147483648, 5, 0, ERANGE},
+  {"-553032005532", -2147483648, 6, 0, 0},
+  {"-553032005533", -2147483648, 6, 0, ERANGE},
+  {"-104134211162", -2147483648, 7, 0, 0},
+  {"-104134211163", -2147483648, 7, 0, ERANGE},
+  {"-20000000000", -2147483648, 8, 0, },
+  {"-20000000001", -2147483648, 8, 0, ERANGE},
+  {"-5478773672", -2147483648, 9, 0, 0},
+  {"-5478773673", -2147483648, 9, 0, ERANGE},
+  {"-2147483648", -2147483648, 10, 0, 0},
+  {"-2147483649", -2147483648, 10, 0, ERANGE},
+  {"-a02220282", -2147483648, 11, 0, 0},
+  {"-a02220283", -2147483648, 11, 0, ERANGE},
+  {"-4bb2308a8", -2147483648, 12, 0, 0},
+  {"-4bb2308a9", -2147483648, 12, 0, ERANGE},
+  {"-282ba4aab", -2147483648, 13, 0, 0},
+  {"-282ba4aac", -2147483648, 13, 0, ERANGE},
+  {"-1652ca932", -2147483648, 14, 0, 0},
+  {"-1652ca933", -2147483648, 14, 0, ERANGE},
+  {"-c87e66b8", -2147483648, 15, 0, 0},
+  {"-c87e66b9", -2147483648, 15, 0, ERANGE},
+  {"-80000000", -2147483648, 16, 0, 0},
+  {"-80000001", -2147483648, 16, 0, ERANGE},
+  {"-53g7f549", -2147483648, 17, 0, 0},
+  {"-53g7f54a", -2147483648, 17, 0, ERANGE},
+  {"-3928g3h2", -2147483648, 18, 0, 0},
+  {"-3928g3h3", -2147483648, 18, 0, ERANGE},
+  {"-27c57h33", -2147483648, 19, 0, 0},
+  {"-27c57h34", -2147483648, 19, 0, ERANGE},
+  {"-1db1f928", -2147483648, 20, 0, 0},
+  {"-1db1f929", -2147483648, 20, 0, ERANGE},
+  {"-140h2d92", -2147483648, 21, 0, 0},
+  {"-140h2d93", -2147483648, 21, 0, ERANGE},
+  {"-ikf5bf2", -2147483648, 22, 0, 0},
+  {"-ikf5bf3", -2147483648, 22, 0, ERANGE},
+  {"-ebelf96", -2147483648, 23, 0, 0},
+  {"-ebelf97", -2147483648, 23, 0, ERANGE},
+  {"-b5gge58", -2147483648, 24, 0, 0},
+  {"-b5gge59", -2147483648, 24, 0, ERANGE},
+  {"-8jmdnkn", -2147483648, 25, 0, 0},
+  {"-8jmdnko", -2147483648, 25, 0, ERANGE},
+  {"-6oj8ioo", -2147483648, 26, 0, 0},
+  {"-6oj8iop", -2147483648, 26, 0, ERANGE},
+  {"-5ehnckb", -2147483648, 27, 0, 0},
+  {"-5ehnckc", -2147483648, 27, 0, ERANGE},
+  {"-4clm98g", -2147483648, 28, 0, 0},
+  {"-4clm98h", -2147483648, 28, 0, ERANGE},
+  {"-3hk7988", -2147483648, 29, 0, 0},
+  {"-3hk7989", -2147483648, 29, 0, ERANGE},
+  {"-2sb6cs8", -2147483648, 30, 0, 0},
+  {"-2sb6cs9", -2147483648, 30, 0, ERANGE},
+  {"-2d09uc2", -2147483648, 31, 0, 0},
+  {"-2d09uc3", -2147483648, 31, 0, ERANGE},
+  {"-2000000", -2147483648, 32, 0, 0},
+  {"-2000001", -2147483648, 32, 0, ERANGE},
+  {"-1lsqtl2", -2147483648, 33, 0, 0},
+  {"-1lsqtl3", -2147483648, 33, 0, ERANGE},
+  {"-1d8xqrq", -2147483648, 34, 0, 0},
+  {"-1d8xqrr", -2147483648, 34, 0, ERANGE},
+  {"-15v22un", -2147483648, 35, 0, 0},
+  {"-15v22uo", -2147483648, 35, 0, ERANGE},
+  {"-zik0zk", -2147483648, 36, 0, 0},
+  {"-zik0zl", -2147483648, 36, 0, ERANGE},
 #else
   {"9223372036854775807", 9223372036854775807, 0, 0, 0},
   {"9223372036854775808", 9223372036854775807, 0, 0, ERANGE},
@@ -74,6 +216,156 @@
   {"-9223372036854775809", 0x8000000000000000, 0, 0, ERANGE},
   {"0x112233445566778899z", 9223372036854775807, 16, 'z', ERANGE},
   {"0xFFFFFFFFFFFF00FF" , 9223372036854775807, 0, 0, ERANGE},
+
+  {"111111111111111111111111111111111111111111111111111111111111111",
+   9223372036854775807, 2, 0, 0},
+  {"1000000000000000000000000000000000000000000000000000000000000000",
+   9223372036854775807, 2, 0, ERANGE},
+  {"2021110011022210012102010021220101220221",
+   9223372036854775807, 3, 0, 0},
+  {"2021110011022210012102010021220101220222",
+   9223372036854775807, 3, 0, ERANGE},
+  {"13333333333333333333333333333333", 9223372036854775807, 4, 0, 0},
+  {"20000000000000000000000000000000", 9223372036854775807, 4, 0, ERANGE},
+  {"1104332401304422434310311212", 9223372036854775807, 5, 0, 0},
+  {"1104332401304422434310311213", 9223372036854775807, 5, 0, ERANGE},
+  {"1540241003031030222122211", 9223372036854775807, 6, 0, 0},
+  {"1540241003031030222122212", 9223372036854775807, 6, 0, ERANGE},
+  {"22341010611245052052300", 9223372036854775807, 7, 0, 0},
+  {"22341010611245052052301", 9223372036854775807, 7, 0, ERANGE},
+  {"777777777777777777777", 9223372036854775807, 8, 0, 0},
+  {"1000000000000000000000", 9223372036854775807, 8, 0, ERANGE},
+  {"67404283172107811827", 9223372036854775807, 9, 0, 0},
+  {"67404283172107811828", 9223372036854775807, 9, 0, ERANGE},
+  {"9223372036854775807", 9223372036854775807, 10, 0, 0},
+  {"9223372036854775808", 9223372036854775807, 10, 0, ERANGE},
+  {"1728002635214590697", 9223372036854775807, 11, 0, 0},
+  {"1728002635214590698", 9223372036854775807, 11, 0, ERANGE},
+  {"41a792678515120367", 9223372036854775807, 12, 0, 0},
+  {"41a792678515120368", 9223372036854775807, 12, 0, ERANGE},
+  {"10b269549075433c37", 9223372036854775807, 13, 0, 0},
+  {"10b269549075433c38", 9223372036854775807, 13, 0, ERANGE},
+  {"4340724c6c71dc7a7", 9223372036854775807, 14, 0, 0},
+  {"4340724c6c71dc7a8", 9223372036854775807, 14, 0, ERANGE},
+  {"160e2ad3246366807", 9223372036854775807, 15, 0, 0},
+  {"160e2ad3246366808", 9223372036854775807, 15, 0, ERANGE},
+  {"7fffffffffffffff", 9223372036854775807, 16, 0, 0},
+  {"8000000000000000", 9223372036854775807, 16, 0, ERANGE},
+  {"33d3d8307b214008", 9223372036854775807, 17, 0, 0},
+  {"33d3d8307b214009", 9223372036854775807, 17, 0, ERANGE},
+  {"16agh595df825fa7", 9223372036854775807, 18, 0, 0},
+  {"16agh595df825fa8", 9223372036854775807, 18, 0, ERANGE},
+  {"ba643dci0ffeehh", 9223372036854775807, 19, 0, 0},
+  {"ba643dci0ffeehi", 9223372036854775807, 19, 0, ERANGE},
+  {"5cbfjia3fh26ja7", 9223372036854775807, 20, 0, 0},
+  {"5cbfjia3fh26ja8", 9223372036854775807, 20, 0, ERANGE},
+  {"2heiciiie82dh97", 9223372036854775807, 21, 0, 0},
+  {"2heiciiie82dh98", 9223372036854775807, 21, 0, ERANGE},
+  {"1adaibb21dckfa7", 9223372036854775807, 22, 0, 0},
+  {"1adaibb21dckfa8", 9223372036854775807, 22, 0, ERANGE},
+  {"i6k448cf4192c2", 9223372036854775807, 23, 0, 0},
+  {"i6k448cf4192c3", 9223372036854775807, 23, 0, ERANGE},
+  {"acd772jnc9l0l7", 9223372036854775807, 24, 0, 0},
+  {"acd772jnc9l0l8", 9223372036854775807, 24, 0, ERANGE},
+  {"64ie1focnn5g77", 9223372036854775807, 25, 0, 0},
+  {"64ie1focnn5g78", 9223372036854775807, 25, 0, ERANGE},
+  {"3igoecjbmca687", 9223372036854775807, 26, 0, 0},
+  {"3igoecjbmca688", 9223372036854775807, 26, 0, ERANGE},
+  {"27c48l5b37oaop", 9223372036854775807, 27, 0, 0},
+  {"27c48l5b37oaoq", 9223372036854775807, 27, 0, ERANGE},
+  {"1bk39f3ah3dmq7", 9223372036854775807, 28, 0, 0},
+  {"1bk39f3ah3dmq8", 9223372036854775807, 28, 0, ERANGE},
+  {"q1se8f0m04isb", 9223372036854775807, 29, 0, 0},
+  {"q1se8f0m04isc", 9223372036854775807, 29, 0, ERANGE},
+  {"hajppbc1fc207", 9223372036854775807, 30, 0, 0},
+  {"hajppbc1fc208", 9223372036854775807, 30, 0, ERANGE},
+  {"bm03i95hia437", 9223372036854775807, 31, 0, 0},
+  {"bm03i95hia438", 9223372036854775807, 31, 0, ERANGE},
+  {"7vvvvvvvvvvvv", 9223372036854775807, 32, 0, 0},
+  {"8000000000000", 9223372036854775807, 32, 0, ERANGE},
+  {"5hg4ck9jd4u37", 9223372036854775807, 33, 0, 0},
+  {"5hg4ck9jd4u38", 9223372036854775807, 33, 0, ERANGE},
+  {"3tdtk1v8j6tpp", 9223372036854775807, 34, 0, 0},
+  {"3tdtk1v8j6tpq", 9223372036854775807, 34, 0, ERANGE},
+  {"2pijmikexrxp7", 9223372036854775807, 35, 0, 0},
+  {"2pijmikexrxp8", 9223372036854775807, 35, 0, ERANGE},
+  {"1y2p0ij32e8e7", 9223372036854775807, 36, 0, 0},
+  {"1y2p0ij32e8e8", 9223372036854775807, 36, 0, ERANGE},
+
+  {"-1000000000000000000000000000000000000000000000000000000000000000",
+   -9223372036854775808ull, 2, 0, 0},
+  {"-1000000000000000000000000000000000000000000000000000000000000001",
+   -9223372036854775808ull, 2, 0, ERANGE},
+  {"-2021110011022210012102010021220101220222",
+   -9223372036854775808ull, 3, 0, 0},
+  {"-2021110011022210012102010021220101221000",
+   -9223372036854775808l, 3, 0, ERANGE},
+  {"-20000000000000000000000000000000", -9223372036854775808ull, 4, 0, 0},
+  {"-20000000000000000000000000000001", -9223372036854775808ull, 4, 0, ERANGE},
+  {"-1104332401304422434310311213", -9223372036854775808ull, 5, 0, 0},
+  {"-1104332401304422434310311214", -9223372036854775808ull, 5, 0, ERANGE},
+  {"-1540241003031030222122212", -9223372036854775808ull, 6, 0, 0},
+  {"-1540241003031030222122213", -9223372036854775808ull, 6, 0, ERANGE},
+  {"-22341010611245052052301", -9223372036854775808ull, 7, 0, 0},
+  {"-22341010611245052052302", -9223372036854775808ull, 7, 0, ERANGE},
+  {"-1000000000000000000000", -9223372036854775808ull, 8, 0, 0},
+  {"-1000000000000000000001", -9223372036854775808ull, 8, 0, ERANGE},
+  {"-67404283172107811828", -9223372036854775808ull, 9, 0, 0},
+  {"-67404283172107811830", -9223372036854775808ull, 9, 0, ERANGE},
+  {"-9223372036854775808", -9223372036854775808ull, 10, 0, 0},
+  {"-9223372036854775809", -9223372036854775808ull, 10, 0, ERANGE},
+  {"-1728002635214590698", -9223372036854775808ull, 11, 0, 0},
+  {"-1728002635214590699", -9223372036854775808ull, 11, 0, ERANGE},
+  {"-41a792678515120368", -9223372036854775808ull, 12, 0, 0},
+  {"-41a792678515120369", -9223372036854775808ull, 12, 0, ERANGE},
+  {"-10b269549075433c38", -9223372036854775808ull, 13, 0, 0},
+  {"-10b269549075433c39", -9223372036854775808ull, 13, 0, ERANGE},
+  {"-4340724c6c71dc7a8", -9223372036854775808ull, 14, 0, 0},
+  {"-4340724c6c71dc7a9", -9223372036854775808ull, 14, 0, ERANGE},
+  {"-160e2ad3246366808", -9223372036854775808ull, 15, 0, 0},
+  {"-160e2ad3246366809", -9223372036854775808ull, 15, 0, ERANGE},
+  {"-8000000000000000", -9223372036854775808ull, 16, 0, 0},
+  {"-8000000000000001", -9223372036854775808ull, 16, 0, ERANGE},
+  {"-33d3d8307b214009", -9223372036854775808ull, 17, 0, 0},
+  {"-33d3d8307b21400a", -9223372036854775808ull, 17, 0, ERANGE},
+  {"-16agh595df825fa8", -9223372036854775808ull, 18, 0, 0},
+  {"-16agh595df825fa9", -9223372036854775808ull, 18, 0, ERANGE},
+  {"-ba643dci0ffeehi", -9223372036854775808ull, 19, 0, 0},
+  {"-ba643dci0ffeei0", -9223372036854775808ull, 19, 0, ERANGE},
+  {"-5cbfjia3fh26ja8", -9223372036854775808ull, 20, 0, 0},
+  {"-5cbfjia3fh26ja9", -9223372036854775808ull, 20, 0, ERANGE},
+  {"-2heiciiie82dh98", -9223372036854775808ull, 21, 0, 0},
+  {"-2heiciiie82dh99", -9223372036854775808ull, 21, 0, ERANGE},
+  {"-1adaibb21dckfa8", -9223372036854775808ull, 22, 0, 0},
+  {"-1adaibb21dckfa9", -9223372036854775808ull, 22, 0, ERANGE},
+  {"-i6k448cf4192c3", -9223372036854775808ull, 23, 0, 0},
+  {"-i6k448cf4192c4", -9223372036854775808ull, 23, 0, ERANGE},
+  {"-acd772jnc9l0l8", -9223372036854775808ull, 24, 0, 0},
+  {"-acd772jnc9l0l9", -9223372036854775808ull, 24, 0, ERANGE},
+  {"-64ie1focnn5g78", -9223372036854775808ull, 25, 0, 0},
+  {"-64ie1focnn5g79", -9223372036854775808ull, 25, 0, ERANGE},
+  {"-3igoecjbmca688", -9223372036854775808ull, 26, 0, 0},
+  {"-3igoecjbmca689", -9223372036854775808ull, 26, 0, ERANGE},
+  {"-27c48l5b37oaoq", -9223372036854775808ull, 27, 0, 0},
+  {"-27c48l5b37oap0", -9223372036854775808ull, 27, 0, ERANGE},
+  {"-1bk39f3ah3dmq8", -9223372036854775808ull, 28, 0, 0},
+  {"-1bk39f3ah3dmq9", -9223372036854775808ull, 28, 0, ERANGE},
+  {"-q1se8f0m04isc", -9223372036854775808ull, 29, 0, 0},
+  {"-q1se8f0m04isd", -9223372036854775808ull, 29, 0, ERANGE},
+  {"-hajppbc1fc208", -9223372036854775808ull, 30, 0, 0},
+  {"-hajppbc1fc209", -9223372036854775808ull, 30, 0, ERANGE},
+  {"-bm03i95hia438", -9223372036854775808ull, 31, 0, 0},
+  {"-bm03i95hia439", -9223372036854775808ull, 31, 0, ERANGE},
+  {"-8000000000000", -9223372036854775808ull, 32, 0, 0},
+  {"-8000000000001", -9223372036854775808ull, 32, 0, ERANGE},
+  {"-5hg4ck9jd4u38", -9223372036854775808ull, 33, 0, 0},
+  {"-5hg4ck9jd4u39", -9223372036854775808ull, 33, 0, ERANGE},
+  {"-3tdtk1v8j6tpq", -9223372036854775808ull, 34, 0, 0},
+  {"-3tdtk1v8j6tpr", -9223372036854775808ull, 34, 0, ERANGE},
+  {"-2pijmikexrxp8", -9223372036854775808ull, 35, 0, 0},
+  {"-2pijmikexrxp9", -9223372036854775808ull, 35, 0, ERANGE},
+  {"-1y2p0ij32e8e8", -9223372036854775808ull, 36, 0, 0},
+  {"-1y2p0ij32e8e9", -9223372036854775808ull, 36, 0, ERANGE},
 #endif
   {NULL, 0, 0, 0, 0},
 
@@ -84,11 +376,157 @@
   {"-0xfedcba98", 0x01234568, 0, 0, 0},
   {"0xf1f2f3f4f5", 0xffffffff, 0, 0, ERANGE},
   {"-0x123456789", 0xffffffff, 0, 0, ERANGE},
+
+  {"11111111111111111111111111111111", 0xffffffff, 2, 0, 0},
+  {"100000000000000000000000000000000", 0xffffffff, 2, 0, ERANGE},
+  {"102002022201221111210", 0xffffffff, 3, 0, 0},
+  {"102002022201221111211", 0xffffffff, 3, 0, ERANGE},
+  {"3333333333333333", 0xffffffff, 4, 0, 0},
+  {"10000000000000000", 0xffffffff, 4, 0, ERANGE},
+  {"32244002423140", 0xffffffff, 5, 0, 0},
+  {"32244002423141", 0xffffffff, 5, 0, ERANGE},
+  {"1550104015503", 0xffffffff, 6, 0, 0},
+  {"1550104015504", 0xffffffff, 6, 0, ERANGE},
+  {"211301422353", 0xffffffff, 7, 0, 0},
+  {"211301422354", 0xffffffff, 7, 0, ERANGE},
+  {"37777777777", 0xffffffff, 8, 0, 0},
+  {"40000000000", 0xffffffff, 8, 0, ERANGE},
+  {"12068657453", 0xffffffff, 9, 0, 0},
+  {"12068657454", 0xffffffff, 9, 0, ERANGE},
+  {"4294967295", 0xffffffff, 10, 0, 0},
+  {"4294967296", 0xffffffff, 10, 0, ERANGE},
+  {"1904440553", 0xffffffff, 11, 0, 0},
+  {"1904440554", 0xffffffff, 11, 0, ERANGE},
+  {"9ba461593", 0xffffffff, 12, 0, 0},
+  {"9ba461594", 0xffffffff, 12, 0, ERANGE},
+  {"535a79888", 0xffffffff, 13, 0, 0},
+  {"535a79889", 0xffffffff, 13, 0, ERANGE},
+  {"2ca5b7463", 0xffffffff, 14, 0, 0},
+  {"2ca5b7464", 0xffffffff, 14, 0, ERANGE},
+  {"1a20dcd80", 0xffffffff, 15, 0, 0},
+  {"1a20dcd81", 0xffffffff, 15, 0, ERANGE},
+  {"ffffffff", 0xffffffff, 16, 0, 0},
+  {"100000000", 0xffffffff, 16, 0, ERANGE},
+  {"a7ffda90", 0xffffffff, 17, 0, 0},
+  {"a7ffda91", 0xffffffff, 17, 0, ERANGE},
+  {"704he7g3", 0xffffffff, 18, 0, 0},
+  {"704he7g4", 0xffffffff, 18, 0, ERANGE},
+  {"4f5aff65", 0xffffffff, 19, 0, 0},
+  {"4f5aff66", 0xffffffff, 19, 0, ERANGE},
+  {"3723ai4f", 0xffffffff, 20, 0, 0},
+  {"3723ai4g", 0xffffffff, 20, 0, ERANGE},
+  {"281d55i3", 0xffffffff, 21, 0, 0},
+  {"281d55i4", 0xffffffff, 21, 0, ERANGE},
+  {"1fj8b183", 0xffffffff, 22, 0, 0},
+  {"1fj8b184", 0xffffffff, 22, 0, ERANGE},
+  {"1606k7ib", 0xffffffff, 23, 0, 0},
+  {"1606k7ic", 0xffffffff, 23, 0, ERANGE},
+  {"mb994af", 0xffffffff, 24, 0, 0},
+  {"mb994ag", 0xffffffff, 24, 0, ERANGE},
+  {"hek2mgk", 0xffffffff, 25, 0, 0},
+  {"hek2mgl", 0xffffffff, 25, 0, ERANGE},
+  {"dnchbnl", 0xffffffff, 26, 0, 0},
+  {"dnchbnm", 0xffffffff, 26, 0, ERANGE},
+  {"b28jpdl", 0xffffffff, 27, 0, 0},
+  {"b28jpdm", 0xffffffff, 27, 0, ERANGE},
+  {"8pfgih3", 0xffffffff, 28, 0, 0},
+  {"8pfgih4", 0xffffffff, 28, 0, ERANGE},
+  {"76beigf", 0xffffffff, 29, 0, 0},
+  {"76beigg", 0xffffffff, 29, 0, ERANGE},
+  {"5qmcpqf", 0xffffffff, 30, 0, 0},
+  {"5qmcpqg", 0xffffffff, 30, 0, ERANGE},
+  {"4q0jto3", 0xffffffff, 31, 0, 0},
+  {"4q0jto4", 0xffffffff, 31, 0, ERANGE},
+  {"3vvvvvv", 0xffffffff, 32, 0, 0},
+  {"4000000", 0xffffffff, 32, 0, ERANGE},
+  {"3aokq93", 0xffffffff, 33, 0, 0},
+  {"3aokq94", 0xffffffff, 33, 0, ERANGE},
+  {"2qhxjlh", 0xffffffff, 34, 0, 0},
+  {"2qhxjli", 0xffffffff, 34, 0, ERANGE},
+  {"2br45qa", 0xffffffff, 35, 0, 0},
+  {"2br45qb", 0xffffffff, 35, 0, ERANGE},
+  {"1z141z3", 0xffffffff, 36, 0, 0},
+  {"1z141z4", 0xffffffff, 36, 0, ERANGE},
 #else
   {"0xffffffffffffffffg", 0xffffffffffffffff, 0, 'g', 0},
   {"-0xfedcba987654321", 0xf0123456789abcdf, 0, 0, 0},
   {"0xf1f2f3f4f5f6f7f8f9", 0xffffffffffffffff, 0, 0, ERANGE},
   {"-0x123456789abcdef01", 0xffffffffffffffff, 0, 0, ERANGE},
+
+  {"1111111111111111111111111111111111111111111111111111111111111111",
+   0xffffffffffffffff, 2, 0, 0},
+  {"10000000000000000000000000000000000000000000000000000000000000000",
+   0xffffffffffffffff, 2, 0, ERANGE},
+  {"11112220022122120101211020120210210211220",
+   0xffffffffffffffff, 3, 0, 0},
+  {"11112220022122120101211020120210210211221",
+   0xffffffffffffffff, 3, 0, ERANGE},
+  {"33333333333333333333333333333333", 0xffffffffffffffff, 4, 0, 0},
+  {"100000000000000000000000000000000", 0xffffffffffffffff, 4, 0, ERANGE},
+  {"2214220303114400424121122430", 0xffffffffffffffff, 5, 0, 0},
+  {"2214220303114400424121122431", 0xffffffffffffffff, 5, 0, ERANGE},
+  {"3520522010102100444244423", 0xffffffffffffffff, 6, 0, 0},
+  {"3520522010102100444244424", 0xffffffffffffffff, 6, 0, ERANGE},
+  {"45012021522523134134601", 0xffffffffffffffff, 7, 0, 0},
+  {"45012021522523134134602", 0xffffffffffffffff, 7, 0, ERANGE},
+  {"1777777777777777777777", 0xffffffffffffffff, 8, 0, 0},
+  {"2000000000000000000000", 0xffffffffffffffff, 8, 0, ERANGE},
+  {"145808576354216723756", 0xffffffffffffffff, 9, 0, 0},
+  {"145808576354216723757", 0xffffffffffffffff, 9, 0, ERANGE},
+  {"18446744073709551615", 0xffffffffffffffff, 10, 0, 0},
+  {"18446744073709551616", 0xffffffffffffffff, 10, 0, ERANGE},
+  {"335500516a429071284", 0xffffffffffffffff, 11, 0, 0},
+  {"335500516a429071285", 0xffffffffffffffff, 11, 0, ERANGE},
+  {"839365134a2a240713", 0xffffffffffffffff, 12, 0, 0},
+  {"839365134a2a240714", 0xffffffffffffffff, 12, 0, ERANGE},
+  {"219505a9511a867b72", 0xffffffffffffffff, 13, 0, 0},
+  {"219505a9511a867b73", 0xffffffffffffffff, 13, 0, ERANGE},
+  {"8681049adb03db171", 0xffffffffffffffff, 14, 0, 0},
+  {"8681049adb03db172", 0xffffffffffffffff, 14, 0, ERANGE},
+  {"2c1d56b648c6cd110", 0xffffffffffffffff, 15, 0, 0},
+  {"2c1d56b648c6cd111", 0xffffffffffffffff, 15, 0, ERANGE},
+  {"ffffffffffffffff", 0xffffffffffffffff, 16, 0, 0},
+  {"10000000000000000", 0xffffffffffffffff, 16, 0, ERANGE},
+  {"67979g60f5428010", 0xffffffffffffffff, 17, 0, 0},
+  {"67979g60f5428011", 0xffffffffffffffff, 17, 0, ERANGE},
+  {"2d3fgb0b9cg4bd2f", 0xffffffffffffffff, 18, 0, 0},
+  {"2d3fgb0b9cg4bd2g", 0xffffffffffffffff, 18, 0, ERANGE},
+  {"141c8786h1ccaagg", 0xffffffffffffffff, 19, 0, 0},
+  {"141c8786h1ccaagh", 0xffffffffffffffff, 19, 0, ERANGE},
+  {"b53bjh07be4dj0f", 0xffffffffffffffff, 20, 0, 0},
+  {"b53bjh07be4dj0g", 0xffffffffffffffff, 20, 0, ERANGE},
+  {"5e8g4ggg7g56dif", 0xffffffffffffffff, 21, 0, 0},
+  {"5e8g4ggg7g56dig", 0xffffffffffffffff, 21, 0, ERANGE},
+  {"2l4lf104353j8kf", 0xffffffffffffffff, 22, 0, 0},
+  {"2l4lf104353j8kg", 0xffffffffffffffff, 22, 0, ERANGE},
+  {"1ddh88h2782i515", 0xffffffffffffffff, 23, 0, 0},
+  {"1ddh88h2782i516", 0xffffffffffffffff, 23, 0, ERANGE},
+  {"l12ee5fn0ji1if", 0xffffffffffffffff, 24, 0, 0},
+  {"l12ee5fn0ji1ig", 0xffffffffffffffff, 24, 0, ERANGE},
+  {"c9c336o0mlb7ef", 0xffffffffffffffff, 25, 0, 0},
+  {"c9c336o0mlb7eg", 0xffffffffffffffff, 25, 0, ERANGE},
+  {"7b7n2pcniokcgf", 0xffffffffffffffff, 26, 0, 0},
+  {"7b7n2pcniokcgg", 0xffffffffffffffff, 26, 0, ERANGE},
+  {"4eo8hfam6fllmo", 0xffffffffffffffff, 27, 0, 0},
+  {"4eo8hfam6fllmp", 0xffffffffffffffff, 27, 0, ERANGE},
+  {"2nc6j26l66rhof", 0xffffffffffffffff, 28, 0, 0},
+  {"2nc6j26l66rhog", 0xffffffffffffffff, 28, 0, ERANGE},
+  {"1n3rsh11f098rn", 0xffffffffffffffff, 29, 0, 0},
+  {"1n3rsh11f098ro", 0xffffffffffffffff, 29, 0, ERANGE},
+  {"14l9lkmo30o40f", 0xffffffffffffffff, 30, 0, 0},
+  {"14l9lkmo30o40g", 0xffffffffffffffff, 30, 0, ERANGE},
+  {"nd075ib45k86f", 0xffffffffffffffff, 31, 0, 0},
+  {"nd075ib45k86g", 0xffffffffffffffff, 31, 0, ERANGE},
+  {"fvvvvvvvvvvvv", 0xffffffffffffffff, 32, 0, 0},
+  {"g000000000000", 0xffffffffffffffff, 32, 0, ERANGE},
+  {"b1w8p7j5q9r6f", 0xffffffffffffffff, 33, 0, 0},
+  {"b1w8p7j5q9r6g", 0xffffffffffffffff, 33, 0, ERANGE},
+  {"7orp63sh4dphh", 0xffffffffffffffff, 34, 0, 0},
+  {"7orp63sh4dphi", 0xffffffffffffffff, 34, 0, ERANGE},
+  {"5g24a25twkwff", 0xffffffffffffffff, 35, 0, 0},
+  {"5g24a25twkwfg", 0xffffffffffffffff, 35, 0, ERANGE},
+  {"3w5e11264sgsf", 0xffffffffffffffff, 36, 0, 0},
+  {"3w5e11264sgsg", 0xffffffffffffffff, 36, 0, ERANGE},
 #endif
   {NULL, 0, 0, 0, 0},
   };

Modified: trunk/libc/stdlib/tst-strtoll.c
==============================================================================
--- trunk/libc/stdlib/tst-strtoll.c (original)
+++ trunk/libc/stdlib/tst-strtoll.c Thu Sep  3 07:33:58 2009
@@ -69,6 +69,156 @@
   {"-9223372036854775809", -9223372036854775807ll - 1, 0, 0, ERANGE},
   {"0x112233445566778899z", 9223372036854775807ll, 16, 'z', ERANGE},
   {"0xFFFFFFFFFFFF00FF" , 9223372036854775807ll, 0, 0, ERANGE},
+
+  {"111111111111111111111111111111111111111111111111111111111111111",
+   9223372036854775807ll, 2, 0, 0},
+  {"1000000000000000000000000000000000000000000000000000000000000000",
+   9223372036854775807ll, 2, 0, ERANGE},
+  {"2021110011022210012102010021220101220221",
+   9223372036854775807ll, 3, 0, 0},
+  {"2021110011022210012102010021220101220222",
+   9223372036854775807ll, 3, 0, ERANGE},
+  {"13333333333333333333333333333333", 9223372036854775807ll, 4, 0, 0},
+  {"20000000000000000000000000000000", 9223372036854775807ll, 4, 0, ERANGE},
+  {"1104332401304422434310311212", 9223372036854775807ll, 5, 0, 0},
+  {"1104332401304422434310311213", 9223372036854775807ll, 5, 0, ERANGE},
+  {"1540241003031030222122211", 9223372036854775807ll, 6, 0, 0},
+  {"1540241003031030222122212", 9223372036854775807ll, 6, 0, ERANGE},
+  {"22341010611245052052300", 9223372036854775807ll, 7, 0, 0},
+  {"22341010611245052052301", 9223372036854775807ll, 7, 0, ERANGE},
+  {"777777777777777777777", 9223372036854775807ll, 8, 0, 0},
+  {"1000000000000000000000", 9223372036854775807ll, 8, 0, ERANGE},
+  {"67404283172107811827", 9223372036854775807ll, 9, 0, 0},
+  {"67404283172107811828", 9223372036854775807ll, 9, 0, ERANGE},
+  {"9223372036854775807", 9223372036854775807ll, 10, 0, 0},
+  {"9223372036854775808", 9223372036854775807ll, 10, 0, ERANGE},
+  {"1728002635214590697", 9223372036854775807ll, 11, 0, 0},
+  {"1728002635214590698", 9223372036854775807ll, 11, 0, ERANGE},
+  {"41a792678515120367", 9223372036854775807ll, 12, 0, 0},
+  {"41a792678515120368", 9223372036854775807ll, 12, 0, ERANGE},
+  {"10b269549075433c37", 9223372036854775807ll, 13, 0, 0},
+  {"10b269549075433c38", 9223372036854775807ll, 13, 0, ERANGE},
+  {"4340724c6c71dc7a7", 9223372036854775807ll, 14, 0, 0},
+  {"4340724c6c71dc7a8", 9223372036854775807ll, 14, 0, ERANGE},
+  {"160e2ad3246366807", 9223372036854775807ll, 15, 0, 0},
+  {"160e2ad3246366808", 9223372036854775807ll, 15, 0, ERANGE},
+  {"7fffffffffffffff", 9223372036854775807ll, 16, 0, 0},
+  {"8000000000000000", 9223372036854775807ll, 16, 0, ERANGE},
+  {"33d3d8307b214008", 9223372036854775807ll, 17, 0, 0},
+  {"33d3d8307b214009", 9223372036854775807ll, 17, 0, ERANGE},
+  {"16agh595df825fa7", 9223372036854775807ll, 18, 0, 0},
+  {"16agh595df825fa8", 9223372036854775807ll, 18, 0, ERANGE},
+  {"ba643dci0ffeehh", 9223372036854775807ll, 19, 0, 0},
+  {"ba643dci0ffeehi", 9223372036854775807ll, 19, 0, ERANGE},
+  {"5cbfjia3fh26ja7", 9223372036854775807ll, 20, 0, 0},
+  {"5cbfjia3fh26ja8", 9223372036854775807ll, 20, 0, ERANGE},
+  {"2heiciiie82dh97", 9223372036854775807ll, 21, 0, 0},
+  {"2heiciiie82dh98", 9223372036854775807ll, 21, 0, ERANGE},
+  {"1adaibb21dckfa7", 9223372036854775807ll, 22, 0, 0},
+  {"1adaibb21dckfa8", 9223372036854775807ll, 22, 0, ERANGE},
+  {"i6k448cf4192c2", 9223372036854775807ll, 23, 0, 0},
+  {"i6k448cf4192c3", 9223372036854775807ll, 23, 0, ERANGE},
+  {"acd772jnc9l0l7", 9223372036854775807ll, 24, 0, 0},
+  {"acd772jnc9l0l8", 9223372036854775807ll, 24, 0, ERANGE},
+  {"64ie1focnn5g77", 9223372036854775807ll, 25, 0, 0},
+  {"64ie1focnn5g78", 9223372036854775807ll, 25, 0, ERANGE},
+  {"3igoecjbmca687", 9223372036854775807ll, 26, 0, 0},
+  {"3igoecjbmca688", 9223372036854775807ll, 26, 0, ERANGE},
+  {"27c48l5b37oaop", 9223372036854775807ll, 27, 0, 0},
+  {"27c48l5b37oaoq", 9223372036854775807ll, 27, 0, ERANGE},
+  {"1bk39f3ah3dmq7", 9223372036854775807ll, 28, 0, 0},
+  {"1bk39f3ah3dmq8", 9223372036854775807ll, 28, 0, ERANGE},
+  {"q1se8f0m04isb", 9223372036854775807ll, 29, 0, 0},
+  {"q1se8f0m04isc", 9223372036854775807ll, 29, 0, ERANGE},
+  {"hajppbc1fc207", 9223372036854775807ll, 30, 0, 0},
+  {"hajppbc1fc208", 9223372036854775807ll, 30, 0, ERANGE},
+  {"bm03i95hia437", 9223372036854775807ll, 31, 0, 0},
+  {"bm03i95hia438", 9223372036854775807ll, 31, 0, ERANGE},
+  {"7vvvvvvvvvvvv", 9223372036854775807ll, 32, 0, 0},
+  {"8000000000000", 9223372036854775807ll, 32, 0, ERANGE},
+  {"5hg4ck9jd4u37", 9223372036854775807ll, 33, 0, 0},
+  {"5hg4ck9jd4u38", 9223372036854775807ll, 33, 0, ERANGE},
+  {"3tdtk1v8j6tpp", 9223372036854775807ll, 34, 0, 0},
+  {"3tdtk1v8j6tpq", 9223372036854775807ll, 34, 0, ERANGE},
+  {"2pijmikexrxp7", 9223372036854775807ll, 35, 0, 0},
+  {"2pijmikexrxp8", 9223372036854775807ll, 35, 0, ERANGE},
+  {"1y2p0ij32e8e7", 9223372036854775807ll, 36, 0, 0},
+  {"1y2p0ij32e8e8", 9223372036854775807ll, 36, 0, ERANGE},
+
+  {"-1000000000000000000000000000000000000000000000000000000000000000",
+   -9223372036854775808ull, 2, 0, 0},
+  {"-1000000000000000000000000000000000000000000000000000000000000001",
+   -9223372036854775808ull, 2, 0, ERANGE},
+  {"-2021110011022210012102010021220101220222",
+   -9223372036854775808ull, 3, 0, 0},
+  {"-2021110011022210012102010021220101221000",
+   -9223372036854775808l, 3, 0, ERANGE},
+  {"-20000000000000000000000000000000", -9223372036854775808ull, 4, 0, 0},
+  {"-20000000000000000000000000000001", -9223372036854775808ull, 4, 0, ERANGE},
+  {"-1104332401304422434310311213", -9223372036854775808ull, 5, 0, 0},
+  {"-1104332401304422434310311214", -9223372036854775808ull, 5, 0, ERANGE},
+  {"-1540241003031030222122212", -9223372036854775808ull, 6, 0, 0},
+  {"-1540241003031030222122213", -9223372036854775808ull, 6, 0, ERANGE},
+  {"-22341010611245052052301", -9223372036854775808ull, 7, 0, 0},
+  {"-22341010611245052052302", -9223372036854775808ull, 7, 0, ERANGE},
+  {"-1000000000000000000000", -9223372036854775808ull, 8, 0, 0},
+  {"-1000000000000000000001", -9223372036854775808ull, 8, 0, ERANGE},
+  {"-67404283172107811828", -9223372036854775808ull, 9, 0, 0},
+  {"-67404283172107811830", -9223372036854775808ull, 9, 0, ERANGE},
+  {"-9223372036854775808", -9223372036854775808ull, 10, 0, 0},
+  {"-9223372036854775809", -9223372036854775808ull, 10, 0, ERANGE},
+  {"-1728002635214590698", -9223372036854775808ull, 11, 0, 0},
+  {"-1728002635214590699", -9223372036854775808ull, 11, 0, ERANGE},
+  {"-41a792678515120368", -9223372036854775808ull, 12, 0, 0},
+  {"-41a792678515120369", -9223372036854775808ull, 12, 0, ERANGE},
+  {"-10b269549075433c38", -9223372036854775808ull, 13, 0, 0},
+  {"-10b269549075433c39", -9223372036854775808ull, 13, 0, ERANGE},
+  {"-4340724c6c71dc7a8", -9223372036854775808ull, 14, 0, 0},
+  {"-4340724c6c71dc7a9", -9223372036854775808ull, 14, 0, ERANGE},
+  {"-160e2ad3246366808", -9223372036854775808ull, 15, 0, 0},
+  {"-160e2ad3246366809", -9223372036854775808ull, 15, 0, ERANGE},
+  {"-8000000000000000", -9223372036854775808ull, 16, 0, 0},
+  {"-8000000000000001", -9223372036854775808ull, 16, 0, ERANGE},
+  {"-33d3d8307b214009", -9223372036854775808ull, 17, 0, 0},
+  {"-33d3d8307b21400a", -9223372036854775808ull, 17, 0, ERANGE},
+  {"-16agh595df825fa8", -9223372036854775808ull, 18, 0, 0},
+  {"-16agh595df825fa9", -9223372036854775808ull, 18, 0, ERANGE},
+  {"-ba643dci0ffeehi", -9223372036854775808ull, 19, 0, 0},
+  {"-ba643dci0ffeei0", -9223372036854775808ull, 19, 0, ERANGE},
+  {"-5cbfjia3fh26ja8", -9223372036854775808ull, 20, 0, 0},
+  {"-5cbfjia3fh26ja9", -9223372036854775808ull, 20, 0, ERANGE},
+  {"-2heiciiie82dh98", -9223372036854775808ull, 21, 0, 0},
+  {"-2heiciiie82dh99", -9223372036854775808ull, 21, 0, ERANGE},
+  {"-1adaibb21dckfa8", -9223372036854775808ull, 22, 0, 0},
+  {"-1adaibb21dckfa9", -9223372036854775808ull, 22, 0, ERANGE},
+  {"-i6k448cf4192c3", -9223372036854775808ull, 23, 0, 0},
+  {"-i6k448cf4192c4", -9223372036854775808ull, 23, 0, ERANGE},
+  {"-acd772jnc9l0l8", -9223372036854775808ull, 24, 0, 0},
+  {"-acd772jnc9l0l9", -9223372036854775808ull, 24, 0, ERANGE},
+  {"-64ie1focnn5g78", -9223372036854775808ull, 25, 0, 0},
+  {"-64ie1focnn5g79", -9223372036854775808ull, 25, 0, ERANGE},
+  {"-3igoecjbmca688", -9223372036854775808ull, 26, 0, 0},
+  {"-3igoecjbmca689", -9223372036854775808ull, 26, 0, ERANGE},
+  {"-27c48l5b37oaoq", -9223372036854775808ull, 27, 0, 0},
+  {"-27c48l5b37oap0", -9223372036854775808ull, 27, 0, ERANGE},
+  {"-1bk39f3ah3dmq8", -9223372036854775808ull, 28, 0, 0},
+  {"-1bk39f3ah3dmq9", -9223372036854775808ull, 28, 0, ERANGE},
+  {"-q1se8f0m04isc", -9223372036854775808ull, 29, 0, 0},
+  {"-q1se8f0m04isd", -9223372036854775808ull, 29, 0, ERANGE},
+  {"-hajppbc1fc208", -9223372036854775808ull, 30, 0, 0},
+  {"-hajppbc1fc209", -9223372036854775808ull, 30, 0, ERANGE},
+  {"-bm03i95hia438", -9223372036854775808ull, 31, 0, 0},
+  {"-bm03i95hia439", -9223372036854775808ull, 31, 0, ERANGE},
+  {"-8000000000000", -9223372036854775808ull, 32, 0, 0},
+  {"-8000000000001", -9223372036854775808ull, 32, 0, ERANGE},
+  {"-5hg4ck9jd4u38", -9223372036854775808ull, 33, 0, 0},
+  {"-5hg4ck9jd4u39", -9223372036854775808ull, 33, 0, ERANGE},
+  {"-3tdtk1v8j6tpq", -9223372036854775808ull, 34, 0, 0},
+  {"-3tdtk1v8j6tpr", -9223372036854775808ull, 34, 0, ERANGE},
+  {"-2pijmikexrxp8", -9223372036854775808ull, 35, 0, 0},
+  {"-2pijmikexrxp9", -9223372036854775808ull, 35, 0, ERANGE},
+  {"-1y2p0ij32e8e8", -9223372036854775808ull, 36, 0, 0},
+  {"-1y2p0ij32e8e9", -9223372036854775808ull, 36, 0, ERANGE},
   {NULL, 0, 0, 0, 0},
 
   /* Then unsigned.  */
@@ -78,6 +228,81 @@
   {"-0xfedcba987654321", 0xf0123456789abcdfull, 0, 0, 0},
   {"0xf1f2f3f4f5f6f7f8f9", 0xffffffffffffffffull, 0, 0, ERANGE},
   {"-0x123456789abcdef01", 0xffffffffffffffffull, 0, 0, ERANGE},
+
+  {"1111111111111111111111111111111111111111111111111111111111111111",
+   0xffffffffffffffff, 2, 0, 0},
+  {"10000000000000000000000000000000000000000000000000000000000000000",
+   0xffffffffffffffff, 2, 0, ERANGE},
+  {"11112220022122120101211020120210210211220",
+   0xffffffffffffffff, 3, 0, 0},
+  {"11112220022122120101211020120210210211221",
+   0xffffffffffffffff, 3, 0, ERANGE},
+  {"33333333333333333333333333333333", 0xffffffffffffffff, 4, 0, 0},
+  {"100000000000000000000000000000000", 0xffffffffffffffff, 4, 0, ERANGE},
+  {"2214220303114400424121122430", 0xffffffffffffffff, 5, 0, 0},
+  {"2214220303114400424121122431", 0xffffffffffffffff, 5, 0, ERANGE},
+  {"3520522010102100444244423", 0xffffffffffffffff, 6, 0, 0},
+  {"3520522010102100444244424", 0xffffffffffffffff, 6, 0, ERANGE},
+  {"45012021522523134134601", 0xffffffffffffffff, 7, 0, 0},
+  {"45012021522523134134602", 0xffffffffffffffff, 7, 0, ERANGE},
+  {"1777777777777777777777", 0xffffffffffffffff, 8, 0, 0},
+  {"2000000000000000000000", 0xffffffffffffffff, 8, 0, ERANGE},
+  {"145808576354216723756", 0xffffffffffffffff, 9, 0, 0},
+  {"145808576354216723757", 0xffffffffffffffff, 9, 0, ERANGE},
+  {"18446744073709551615", 0xffffffffffffffff, 10, 0, 0},
+  {"18446744073709551616", 0xffffffffffffffff, 10, 0, ERANGE},
+  {"335500516a429071284", 0xffffffffffffffff, 11, 0, 0},
+  {"335500516a429071285", 0xffffffffffffffff, 11, 0, ERANGE},
+  {"839365134a2a240713", 0xffffffffffffffff, 12, 0, 0},
+  {"839365134a2a240714", 0xffffffffffffffff, 12, 0, ERANGE},
+  {"219505a9511a867b72", 0xffffffffffffffff, 13, 0, 0},
+  {"219505a9511a867b73", 0xffffffffffffffff, 13, 0, ERANGE},
+  {"8681049adb03db171", 0xffffffffffffffff, 14, 0, 0},
+  {"8681049adb03db172", 0xffffffffffffffff, 14, 0, ERANGE},
+  {"2c1d56b648c6cd110", 0xffffffffffffffff, 15, 0, 0},
+  {"2c1d56b648c6cd111", 0xffffffffffffffff, 15, 0, ERANGE},
+  {"ffffffffffffffff", 0xffffffffffffffff, 16, 0, 0},
+  {"10000000000000000", 0xffffffffffffffff, 16, 0, ERANGE},
+  {"67979g60f5428010", 0xffffffffffffffff, 17, 0, 0},
+  {"67979g60f5428011", 0xffffffffffffffff, 17, 0, ERANGE},
+  {"2d3fgb0b9cg4bd2f", 0xffffffffffffffff, 18, 0, 0},
+  {"2d3fgb0b9cg4bd2g", 0xffffffffffffffff, 18, 0, ERANGE},
+  {"141c8786h1ccaagg", 0xffffffffffffffff, 19, 0, 0},
+  {"141c8786h1ccaagh", 0xffffffffffffffff, 19, 0, ERANGE},
+  {"b53bjh07be4dj0f", 0xffffffffffffffff, 20, 0, 0},

[... 219 lines stripped ...]