patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-msort.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes
     2 
     3 msort.c: In function 'msort_with_tmp':
     4 msort.c:59: error: invalid lvalue in increment
     5 msort.c:59: error: invalid lvalue in increment
     6 msort.c:64: error: invalid lvalue in increment
     7 msort.c:64: error: invalid lvalue in increment
     8 make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/stdlib/msort.o] Error 1
     9 make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/stdlib'
    10 make[1]: *** [stdlib/subdir_lib] Error 2
    11 make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
    12 make: *** [all] Error 2 
    13 
    14 when building glibc-2.2.5 with gcc-3.4.
    15 
    16 Taken from ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch
    17 and rediffed.
    18 
    19 --- glibc-2.2.5/stdlib/msort.c.old	2001-07-05 21:55:41.000000000 -0700
    20 +++ glibc-2.2.5/stdlib/msort.c	2005-03-10 08:24:24.152204976 -0800
    21 @@ -1,6 +1,6 @@
    22  /* An alternative to qsort, with an identical interface.
    23     This file is part of the GNU C Library.
    24 -   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
    25 +   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
    26     Written by Mike Haertel, September 1988.
    27  
    28     The GNU C Library is free software; you can redistribute it and/or
    29 @@ -56,12 +56,16 @@
    30  	if ((*cmp) (b1, b2) <= 0)
    31  	  {
    32  	    --n1;
    33 -	    *((op_t *) tmp)++ = *((op_t *) b1)++;
    34 +	    *((op_t *) tmp) = *((op_t *) b1);
    35 +	    tmp += sizeof (op_t);
    36 +	    b1 += sizeof (op_t);
    37  	  }
    38  	else
    39  	  {
    40  	    --n2;
    41 -	    *((op_t *) tmp)++ = *((op_t *) b2)++;
    42 +	    *((op_t *) tmp) = *((op_t *) b2);
    43 +	    tmp += sizeof (op_t);
    44 +	    b2 += sizeof (op_t);
    45  	  }
    46        }
    47    else