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