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