patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-malloc.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
Fixes
yann@1
     2
programs/ld-collate.c: In function 'obstack_int32_grow':
yann@1
     3
programs/ld-collate.c:48: error: invalid lvalue in increment
yann@1
     4
programs/ld-collate.c: In function 'obstack_int32_grow_fast':
yann@1
     5
programs/ld-collate.c:57: error: invalid lvalue in increment
yann@1
     6
yann@1
     7
Change taken by eyeball from version 1.20 at
yann@1
     8
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/malloc/obstack.h?cvsroot=glibc
yann@1
     9
yann@1
    10
--- /home/dank/downloads/glibc-2.2.5/malloc/obstack.h	2001-07-05 21:55:35.000000000 -0700
yann@1
    11
+++ glibc-2.2.5/malloc/obstack.h	2005-03-11 16:12:16.175812224 -0800
yann@1
    12
@@ -423,22 +423,29 @@
yann@1
    13
 ({ struct obstack *__o = (OBSTACK);					\
yann@1
    14
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
yann@1
    15
      _obstack_newchunk (__o, sizeof (void *));				\
yann@1
    16
-   *((void **)__o->next_free)++ = (datum);				\
yann@1
    17
-   (void) 0; })
yann@1
    18
+   obstack_ptr_grow_fast (__o, datum); })
yann@1
    19
 
yann@1
    20
 # define obstack_int_grow(OBSTACK,datum)				\
yann@1
    21
 __extension__								\
yann@1
    22
 ({ struct obstack *__o = (OBSTACK);					\
yann@1
    23
    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
yann@1
    24
      _obstack_newchunk (__o, sizeof (int));				\
yann@1
    25
-   *((int *)__o->next_free)++ = (datum);				\
yann@1
    26
+   obstack_int_grow_fast (__o, datum); })
yann@1
    27
+
yann@1
    28
+# define obstack_ptr_grow_fast(OBSTACK,aptr)				\
yann@1
    29
+__extension__								\
yann@1
    30
+({ struct obstack *__o1 = (OBSTACK);					\
yann@1
    31
+   *(const void **) __o1->next_free = (aptr);				\
yann@1
    32
+   __o1->next_free += sizeof (const void *);				\
yann@1
    33
    (void) 0; })
yann@1
    34
 
yann@1
    35
-# define obstack_ptr_grow_fast(h,aptr)					\
yann@1
    36
-  (*((void **) (h)->next_free)++ = (aptr))
yann@1
    37
+# define obstack_int_grow_fast(OBSTACK,aint)				\
yann@1
    38
+__extension__								\
yann@1
    39
+({ struct obstack *__o1 = (OBSTACK);					\
yann@1
    40
+   *(int *) __o1->next_free = (aint);					\
yann@1
    41
+   __o1->next_free += sizeof (int);					\
yann@1
    42
+   (void) 0; })
yann@1
    43
 
yann@1
    44
-# define obstack_int_grow_fast(h,aint)					\
yann@1
    45
-  (*((int *) (h)->next_free)++ = (aint))
yann@1
    46
 
yann@1
    47
 # define obstack_blank(OBSTACK,length)					\
yann@1
    48
 __extension__								\