patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-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... :-(
yann@1
     1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c.diff?r1=1.20&r2=1.21&cvsroot=glibc
yann@1
     2
yann@1
     3
Fixes
yann@1
     4
yann@1
     5
msort.c: In function `msort_with_tmp':
yann@1
     6
msort.c:59: error: invalid lvalue in increment
yann@1
     7
msort.c:59: error: invalid lvalue in increment
yann@1
     8
msort.c:64: error: invalid lvalue in increment
yann@1
     9
msort.c:64: error: invalid lvalue in increment
yann@1
    10
yann@1
    11
when building with gcc-3.5.
yann@1
    12
yann@1
    13
===================================================================
yann@1
    14
RCS file: /cvs/glibc/libc/stdlib/msort.c,v
yann@1
    15
retrieving revision 1.20
yann@1
    16
retrieving revision 1.21
yann@1
    17
diff -u -r1.20 -r1.21
yann@1
    18
--- libc/stdlib/msort.c	2002/09/24 04:20:57	1.20
yann@1
    19
+++ libc/stdlib/msort.c	2004/02/07 15:57:34	1.21
yann@1
    20
@@ -1,6 +1,6 @@
yann@1
    21
 /* An alternative to qsort, with an identical interface.
yann@1
    22
    This file is part of the GNU C Library.
yann@1
    23
-   Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc.
yann@1
    24
+   Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc.
yann@1
    25
    Written by Mike Haertel, September 1988.
yann@1
    26
 
yann@1
    27
    The GNU C Library is free software; you can redistribute it and/or
yann@1
    28
@@ -56,12 +56,16 @@
yann@1
    29
 	if ((*cmp) (b1, b2) <= 0)
yann@1
    30
 	  {
yann@1
    31
 	    --n1;
yann@1
    32
-	    *((op_t *) tmp)++ = *((op_t *) b1)++;
yann@1
    33
+	    *((op_t *) tmp) = *((op_t *) b1);
yann@1
    34
+	    tmp += sizeof (op_t);
yann@1
    35
+	    b1 += sizeof (op_t);
yann@1
    36
 	  }
yann@1
    37
 	else
yann@1
    38
 	  {
yann@1
    39
 	    --n2;
yann@1
    40
-	    *((op_t *) tmp)++ = *((op_t *) b2)++;
yann@1
    41
+	    *((op_t *) tmp) = *((op_t *) b2);
yann@1
    42
+	    tmp += sizeof (op_t);
yann@1
    43
+	    b2 += sizeof (op_t);
yann@1
    44
 	  }
yann@1
    45
       }
yann@1
    46
   else