patches/glibc/2.3.2/string2-typedef.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 28 21:34:41 2007 +0000 (2007-07-28)
changeset 301 2be7232a73ac
permissions -rw-r--r--
Bump version to 0.2.2.
     1 See http://gcc.gnu.org/ml/gcc/2003-08/msg00959.html
     2 
     3 Compiling glibc-2.3.2 with a gcc-3.4 snapshot, I'm seeing
     4 a whole bunch of warnings like this:
     5 
     6 ../string/bits/string2.h:80: warning: `packed' attribute ignored
     7 ../string/bits/string2.h:81: warning: `packed' attribute ignored
     8 ...
     9 
    10 Looks like it was bad code that was silently ignored by previous compilers.
    11 Ulrich fixed it as follows:
    12 
    13 ===================================================================
    14 RCS file: /cvs/glibc/libc/string/bits/string2.h,v
    15 retrieving revision 1.68
    16 retrieving revision 1.69
    17 diff -u -r1.68 -r1.69
    18 --- libc/string/bits/string2.h	2002/05/25 06:10:18	1.68
    19 +++ libc/string/bits/string2.h	2003/08/20 00:07:37	1.69
    20 @@ -1,5 +1,5 @@
    21  /* Machine-independant string function optimizations.
    22 -   Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
    23 +   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
    24     This file is part of the GNU C Library.
    25     Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    26  
    27 @@ -76,7 +76,7 @@
    28     use unaligned memory accesses.  */
    29  # define __STRING2_COPY_TYPE(N) \
    30    typedef struct { unsigned char __arr[N]; }				      \
    31 -    __STRING2_COPY_ARR##N __attribute__ ((packed))
    32 +    __attribute__ ((__packed__)) __STRING2_COPY_ARR##N
    33  __STRING2_COPY_TYPE (2);
    34  __STRING2_COPY_TYPE (3);
    35  __STRING2_COPY_TYPE (4);