patches/glibc/2.3.2/string2-typedef.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.3.2/string2-typedef.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,35 @@
     1.4 +See http://gcc.gnu.org/ml/gcc/2003-08/msg00959.html
     1.5 +
     1.6 +Compiling glibc-2.3.2 with a gcc-3.4 snapshot, I'm seeing
     1.7 +a whole bunch of warnings like this:
     1.8 +
     1.9 +../string/bits/string2.h:80: warning: `packed' attribute ignored
    1.10 +../string/bits/string2.h:81: warning: `packed' attribute ignored
    1.11 +...
    1.12 +
    1.13 +Looks like it was bad code that was silently ignored by previous compilers.
    1.14 +Ulrich fixed it as follows:
    1.15 +
    1.16 +===================================================================
    1.17 +RCS file: /cvs/glibc/libc/string/bits/string2.h,v
    1.18 +retrieving revision 1.68
    1.19 +retrieving revision 1.69
    1.20 +diff -u -r1.68 -r1.69
    1.21 +--- libc/string/bits/string2.h	2002/05/25 06:10:18	1.68
    1.22 ++++ libc/string/bits/string2.h	2003/08/20 00:07:37	1.69
    1.23 +@@ -1,5 +1,5 @@
    1.24 + /* Machine-independant string function optimizations.
    1.25 +-   Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
    1.26 ++   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
    1.27 +    This file is part of the GNU C Library.
    1.28 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    1.29 + 
    1.30 +@@ -76,7 +76,7 @@
    1.31 +    use unaligned memory accesses.  */
    1.32 + # define __STRING2_COPY_TYPE(N) \
    1.33 +   typedef struct { unsigned char __arr[N]; }				      \
    1.34 +-    __STRING2_COPY_ARR##N __attribute__ ((packed))
    1.35 ++    __attribute__ ((__packed__)) __STRING2_COPY_ARR##N
    1.36 + __STRING2_COPY_TYPE (2);
    1.37 + __STRING2_COPY_TYPE (3);
    1.38 + __STRING2_COPY_TYPE (4);